Borrar filtros
Borrar filtros

save a plot without gridlines

3 visualizaciones (últimos 30 días)
jelle
jelle el 8 de Nov. de 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

Respuesta aceptada

Matt Fig
Matt Fig el 8 de Nov. de 2012
No idea why this happens, but I recommend you use this to export your figure no matter how you made it
  1 comentario
jelle
jelle el 8 de Nov. de 2012
just what I needed, thanks

Iniciar sesión para comentar.

Más respuestas (1)

Richard Quist
Richard Quist el 9 de Nov. de 2012
Editada: Richard Quist el 9 de Nov. de 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.

Categorías

Más información sobre Printing and Saving en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by