Azzera filtri
Azzera filtri

save a plot without gridlines

3 visualizzazioni (ultimi 30 giorni)
jelle
jelle il 8 Nov 2012
I use the plt function found here on the file exchange http://www.mathworks.nl/matlabcentral/fileexchange/4936-plt to make a plot and set the color of the gridlines to white (same as background), set the 'gridlinestyle' to 'none' and used the 'grid off' command. a bit much, I know, but I keep having the same problem. the resulting plot has no gridlines, but when I use either 'saveas' or 'print' to save the figure the gridlines reappear. I saved to both .png and .jpeg, but that made no difference. less important, but also strange is that the figure is rotated 90º couterclockwise. none of these problems occur when I manually save a figure using the drop down menu.
any ideas as to why this happens and how to solve it?
thanks
jelle

Risposta accettata

Matt Fig
Matt Fig il 8 Nov 2012
No idea why this happens, but I recommend you use this to export your figure no matter how you made it

Più risposte (1)

Richard Quist
Richard Quist il 9 Nov 2012
Modificato: Richard Quist il 9 Nov 2012
You might contact the author of the File Exchange submission you're using to see if they can provide assistance. I'd guess that the "grid" you see on those plots aren't the normal MATLAB axes grid, but are really just lines drawn to form a grid. If that's true, the commands you've used to adjust the grid properties are probably not having the effect you desire.
I suggest that you check the values of the figure's *InvertHardcopy * and *PaperOrientation * properties.
* Setting InvertHardcopy to 'off' will probably resolve the re-appearing gridlines issue.
* I'm guessing that the PaperOrientation is something other than 'Portrait'. If that's the case, setting it to 'Portrait' should fix the rotation you're seeing in the generated output
Hope that helps.

Categorie

Scopri di più su Printing and Saving 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!

Translated by