Problems with plotting.
23 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I cannot get functions such as hold on or grid on to properly work. I'm just trying to do a simple exercise where I type:
plot(1,1.5,'o')
hold on
plot(2,2,'*r')
axis([-1,2,0,3])
grid on
I tested this with the online edition and it works as it should, but I'm running into problems with my installed copy. Whenever I execute a line the plot pops up but nothing is saved. First line works fine, when the line 'plot on' is executed a blank plot pops up. When the third line is executed it only shows that plot, and does not include the first line plot. The axis line will show a blank plot with the correct axis scale. The 'grid on' will result in a blank plot with the grid showing, if I run another plot line afterward, the grid will not be showing anymore. I had 2018a installed, and then tried installing 2019b to see if that would fix the issue but still no luck. Not sure if it would make a difference but using education license.
12 Commenti
dpb
il 15 Gen 2020
Try
close all
plot(rand(10,1),'o-b')
hAx=gca; % retrieve current axes handle
%hold on % let's go lower level...
hAx.NextPlot='add'; % what hold on does; "off'--> 'replace'
plot(rand(10,1),'x-r')
Oh...maybe the hold function has somehow gotten corrupted...what does
which -all hold
return?
Or, before the above, one more check...try
close all
hAx=axes; % create a new axis, save handle
hAx.NextPlot % see initial state of hold
plot(rand(10,1),'o-b')
hold on
hAx.NextPlot % and afterwards
to see what hold actually did. Report on results.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!