You are not logged in.
Pages: 1
I am trying to save the figure generated by octave plot to pdf, ps or jpeg format (to be included later into latex file) and I get the same error regardless of the file type I am trying to save it in.
octave:1> p=0.4346
p = 0.43460
octave:2> x=p
x = 0.43460
octave:3> for i=0:12
> p=p*(1+0.7*(1-0.1*p))
> x=[x p]
> end
***OUTPUT***
octave:4> plot([0:13],x)
The above code produces correct function values and correct graph but then comes the trouble:
octave:5> print lecture2Graph2.pdf
Some output formats are not available.
error: fltk: printing not available without gl2ps library
error: octave_base_value::matrix_value(): wrong type argument '<unknown type>'
error: drawnow: A(I,J): row index out of bounds; value 1 out of bound 0
error: called from:
error: /usr/share/octave/3.8.0/m/plot/util/private/__fltk_print__.m at line 166, column 5
error: /usr/share/octave/3.8.0/m/plot/util/print.m at line 422, column 14
octave:5> print lecture2Graph2.ps
error: fltk: printing not available without gl2ps library
error: octave_base_value::matrix_value(): wrong type argument '<unknown type>'
error: drawnow: A(I,J): row index out of bounds; value 1 out of bound 0
error: called from:
error: /usr/share/octave/3.8.0/m/plot/util/private/__fltk_print__.m at line 166, column 5
error: /usr/share/octave/3.8.0/m/plot/util/print.m at line 422, column 14
The very first time I tried to save the graph I didn't have gl2ps library installed, I installed it after that but I still have this error message. Also, I tried to change graphics-toolkit in octave but even when the toolkit is gnuplot (and octave confirms it is a gnuplot) it gives me identical errors.
I am not sure how can I fix it, any suggestions are appreciated. I tried to find the answer before posting on the forum, I couldn't, if I overlooked it please point me to the right direction.
Thank you!
Offline
I am having the same issue.
Octave is version 3.8
Edit: My problem might be slightly different. After rebooting and telling octave to use gnuplot (graphics_toolkit("gnuplot")), the print function works perfectly.
octave:1> print("-depsc2","graph")
error: octave_base_value::matrix_value(): wrong type argument '<unknown type>'
error: drawnow: A(I,J): row index out of bounds; value 1 out of bound 0
error: called from:
error: /usr/share/octave/3.8.0/m/plot/util/private/__fltk_print__.m at line 166, column 5
error: /usr/share/octave/3.8.0/m/plot/util/print.m at line 422, column 14
error: /home/username/Downloads/temperatureData.m at line 7, column 1
octave:2> graphics_toolkit("gnuplot")
octave:3> print("-depsc2","graph")
octave:4>
Last edited by rh995 (2014-02-02 22:06:37)
Offline
Looks like I solved my problem. I tried to play with graphics_toolkit before setting gnuplot instead of fltk before, I don't know if I there was no such error earlier or I just didn't notice it, or it depends on the way I call the print function. This time when I changed the graphics_toolkit to gnuplot and tried to print graph to a file it gave me the following error:
octave:6> print("-depsc2","lecture2Graph2")
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: print.m: pstoedit binary is not available.
Some output formats are not available.
I indeed had no epstool nor pstoedit. I couldn't find epstool but pstoedit is in official repository and after I installed it printing worked both with gnuplot and fltk graphics_toolkit.
Looks like I solved my own problem. Thanks to rh995 I tried print differently from what I did before which lead me to fixing my problem.
Offline
Pages: 1