trouble saving 3D plot

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

trouble saving 3D plot

blindcurrent
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

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

figure.png (142K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: trouble saving 3D plot

Pantxo
blindcurrent wrote
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

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave


figure.png (142K) <http://octave.1599824.n4.nabble.com/attachment/4682154/0/figure.png>
Hi,

This is most probably a bug. Can you file a bug report on sabannah [1]  and provide the original script and data you used, or alternatively upload the file you obtain using "hgsave (gcf, 'myplot.ofig')"?

Pantxo

[1] https://savannah.gnu.org/bugs/?group=octave
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: trouble saving 3D plot

blindcurrent
In reply to this post by blindcurrent
Hi,

I found that the plots can be saved when I reduce the number of points to about 16,000. Leaving 36,000 points, it does not work. So the boundary must lie somewhere in between.

Does it still count as an Octave bug in this case?

Adrian

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Loading...