When attempting to print a plot to .png in Octave 3.8.1.1 on Windows 8 64-bit, the axes plot, but the line I'm plotting won't print. The plot I'm creating is:
> t = 0:0.1:6.28318;
> plot (t, sin(t));
> print figure.png
The resulting plot:
And the image saved to disk:
So the axes are showing up fine, but the line I've plotted is completely missing!
I have gs9.09 (win32) installed, with epstool win32 copied into gs's /bin directory, which is being set in my %HOMEPATH%\.octaverc
as:
cmd_path = getenv ("path");
gs_path = 'C:\Programs\gs\gs9.09\bin';
if (isempty (strfind (cmd_path, gs_path)))
setenv ('path', strcat (cmd_path, pathsep (), gs_path));
endif
I am running the windows GUI version via w8-octave-gui.bat
.
EDIT
On a fresh launch with the following commands to set gnuplot as the graphics toolkit before launching any plots (from @Andy's comments), I get a blank white image for all images without -dpngalpha
(1, 2, 4, 5) and completely transparent images with no content for images with -dpngalpha
(3, 6):
>> graphics_toolkit("gnuplot");
>> graphics_toolkit()
ans = gnuplot
>> t = 0:0.1:6.3;
>> plot(t,sin(t));
>> print ("1.png");
>> print ("-dpng", "2.png");
>> print ("-dpngalpha", "3.png");
>> axis("off");
>> print ("4.png");
>> print ("-dpng", "5.png");
>> print ("-dpngalpha", "6.png");
Halp!
graphics_toolkit
? – am304print ('figure.png','-dpng')
. – juliohmavailable_graphics_toolkits()
listsgnuplot
andfltk
on my system. Switching tognuplot
I can succesfully print only .emf files, and can send the plot to my printer (progress!). Every other format I tried withgnuplot
prints a blank white image (.png, .pdf, .jpg). When I try .gif the application crashes (if saving from the plot window) or reportsthe gnuplot terminal, "gif", is not available
if run from the command window. -- I would ideally like .png output, any thoughts on that? – cod3monk3yfltk
orgnuplot
. – cod3monk3y