save a plot without gridlines

2 次查看(过去 30 天)
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

采纳的回答

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

更多回答(1 个)

Richard Quist
Richard Quist 2012-11-9
编辑:Richard Quist 2012-11-9
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.

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by