The plot disappears if I change xlim
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I have this simple example
K =
0.0000 0.5527
0.0003 0.4017
0.0040 0.2707
0.0210 0.1480
0.0646 0.0646
When I run plot(K) my graph is wrong. If I change the view like view([90 -90]) then I have the right plot.But now the axes is wrong and I have y as x.
First, can I avoid this command (view([90 -90])) and get immediately the right plot?
Second, if i try to change xlim plot disappears.Why this happens? In fact I want to change y limits to be from 0 to 1.
0 Commenti
Risposte (1)
Adam
il 1 Giu 2016
plot( x, y )
is the normal form of the plot function so just use that as e.g.
plot( K(:,2), K(:,1) )
if you want the 2nd column on the x axis and the first on the y axis.
Personally I would always use the form with an explicit axes handle too, but that is a side issue!
3 Commenti
Steven Lord
il 1 Giu 2016
Please post the exact code you used to create the plots and attach pictures from before and after changing the Y axis limits demonstrating the plot "disappearing." The button with a picture on it between the link of chain and the paper clip lets you attach images to your comment or answer.
Vedere anche
Categorie
Scopri di più su Line Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!