save a plot without gridlines

8 ビュー (過去 30 日間)
jelle
jelle 2012 年 11 月 8 日
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 件のコメント
jelle
jelle 2012 年 11 月 8 日
just what I needed, thanks

サインインしてコメントする。

その他の回答 (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 Center および File ExchangePrinting and Saving についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by