I would prefer to keep the black border to the entire graph.
Plotyy matlab 2017 code#
I would prefer getting the problem solved using the plotyy, but if that's not possible I would appreciate a solution for the 2nd piece of code as well. Im trying to visualize multiple series with Mathlab Visualization YY Plot. I would like to remove the ticks from the top and right hand side of the following graph, but keep the ticks on the bottom and left hand side. The problem here is, that it doesn't even show the first and the second line, but only the third and i don't know why. I can't use hLine2.YLim = to manually adjust the y-limits shown on the 2nd y-axis.Īfter I couldn't solve the problem using the plotyy, I searched the MATLAB documentation and found another way of implementing my plot, which I thought might be easier to handle: x=linspace(0,20) Īx2 = axes('Position',ax1.Position,'YAxisLocation','right') im just kind of starting with matlab and struggling with the.I suppose you could do it this way, but your making it harder on yourself. I don't think the set and get commands are needed since any of the versions of matlab 5.0 and beyond. I can change the Linestyles of the two hLines using hLine1.LineStyle = ':' for example, but i can not change the styles of the two lines, that hLine1 consists of. I am not sure why you want to use set and get commands, matlab has built in xlabel, ylabel, title commands that allow you to label your axis.I tried creating a plot with two YAxis like this: x=linspace(0,20)