MATLAB: How to change plotyn plot curve lines to stairs line curve lineplotynstairs line I have 5 curve line, I have got them using plotyn.(see attached plot) I need to change the 5 line curves to stairs type line. How I can do it? Thanks! Best Answer Can't you use STAIRS? An example:x = 0:.2:pi/2 ;y = sin(x) ;plot(x,y,'bo-') ;hold on ;stairs(x,y,'r.-') ;hold off Related SolutionsMATLAB: Plotting multiple separate lines Plot them as column vectors, not row vectors. Try this: A = [x1(:) y1(:)]; B = [x2(:) y2(:)];I am not certain what result you want, so you may need to experiment. MATLAB: How to subplot graphs with more than 4 y-axis in a figure Use the ploty4 version attached. I have modified it to do what you want. You can use it like this:h1 = subplot(2,1,1);x = 0:10;y1=x; y2=x.^2; y3=x.^3; y4=x.^4;[ax,hlines] = plotyyyy(h1,x,y1,x,y2,x,y3,x,y4);h2 = subplot(2,1,2);x = 0:10;y1=x; y2=x.^2; y3=x.^3; y4=x.^4;[ax,hlines] = plotyyyy(h2,x,y1,x,y2,x,y3,x,y4);my output: Related QuestionPlotting 2 lines and one bar with 2 y-axesDivide y values of two graphArea, stairs
Best Answer