how plot two figures on same axis with two different origin points
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have to draw two plots (first plot is square of 50x50, inside this square an vector field(second plot) by using quiver command) , for first plot the origin has to be at bottom left corner and for second plot the origin has to be at top left corner ( x axis ranges from 0 to 50 and y axis ranges form 0 to 50 for both the plots) for first plot the y values ( 0 to 50) shoud go from bottom to top and for second plot y values ( 0 to 50) should go from top to bottom, the xaxis is same for both the plot . i have added an y axis on right side but i want to make it invisible or off ...is there possible way to make y axist on right side to make invisible or off
Any other suggestion other than adding extra y axis (yyaxis right).
KIndly help me .
2 Kommentare
Jan
am 1 Mai 2021
I'm confused: You have a "single figure", but then you speak of "first" and "second" figure. What exactly is a "graph"? What is your question? I assume all you need is to set the 'YDir' proerpty to 'reverse' in one of the axes (not figures).
Antworten (1)
Star Strider
am 1 Mai 2021
If the x-axis is the same for both curves, while one curve has the origin (I assume this means the 0 value on the y-axis) at different values, I would use the yyaxis function, creating separate y-axes for each curve.
4 Kommentare
Star Strider
am 2 Mai 2021
I am using R2021a, so I get the posted result. This should also work in R2020a.
It is important to note that MATLAB is case-sensitive, and that applies to the structure notation in addressing graphics properties (although not to set and get calls, making this a bit confusing at times).
Use this exactly as I typed it —
Ax.YAxis(2).Visible = 'off'; % Make Right Y-Axis Invisible
and you should get the result I posted.
Siehe auch
Kategorien
Mehr zu Vector Fields finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!