help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trouble saving 3D plot


From: blindcurrent
Subject: trouble saving 3D plot
Date: Fri, 3 Mar 2017 16:15:10 +0000 (UTC)

Hello friends of Octave,

I am experiencing trouble saving a 3D plot.

My code loads data from a file and uses surf to create a three-dimensional 
plot. When viewed from the top, like after executing view(2), it can be saved 
with commands like
print('-dpng','test31.png') or
saveas(gcf,'test25.png')
without any problem.

However, after rotating the plot to see the surface at an angle, both print and 
saveas cause Octave to crash. After a few seconds, (not responding) appears in 
the window title. Please see the attached file figure.png to get an idea of 
what the plot I am trying to save looks like.

So far I have tried:
- waiting several minutes,
- both the print and saveas commands,
- setting a lower resolution (with the print command),
- saving the plot in jpg format,
- doing no formatting of the plot after plotting (e.g. colormap, shading, 
colorbar, view, axis, …)
- executing hold off after plotting*,
- terminating every command in the script that does the plotting with a 
semicolon*.

*I found these tips online where other people had trouble saving graphs.

I am using Octave 4.2.1 and Windows 7. The standard graphics toolkit is qt. 
fltk behaves similarly. I have tried gnuplot and succeeded in saving an image 
that looks somewhat like what I want. But I cannot get the formatting right at 
all, and face other issues using gnuplot in addition. Therefore I am trying to 
avoid gnuplot.

What works (with the standard graphics toolkit qt):
- saving sombrero and peaks in their original 3D view, also in high resolution,
- saving the 2D view of my 3D surface (as mentioned above).

Has anyone got any ideas for a solution for this issue, or a workaround?

Best regards,

Adrian

Attachment: figure.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]