`gnuplot' has several terminals to print the plot. One of them is
`gpic'.
`gpic' was developed to work with troff but you can use it to get
latex
pictures. Although `gpic' has a latex output, I recommend you using
`dpic' a
pic processor written by Dwight Aplevich
(http://www.ece.uwaterloo.ca/~aplevich/Circuit_macros/). After you
have
plotted your figure with octave and gnuplot follow the next steps
(write
these commands):
1. octave:>__gnuplot_set__('terminal gpic')
2. octave:>__gnuplot_set__ output "filename.pic"
3. octave:>replot
4. octave:>__gnuplot_set__('terminal x11')
The first command activates the gpic terminal. The second command
indicates
the name of the file where the figure will be saved. The third command
redraws the plot, but is done as a file. The last command
reactivates the
x11 terminal.
The next step is open the file `filename.pic' . Then, the lines
that are out
of the macros .PS and .PE must be delete.
The last step is write:
[prompt]$ dpic -p filename.pic > filename.tex
And you get a pstricks file to be used with latex. You can read the
Aplevich's documentation about dpic to get other outputs: TikZ,
metapost
format, ...
Ana Rakonjac wrote:
When generating plots in Matlab, there is a nice m-file called
laprint.m that makes the graph nice for Latex, eg. changing the fonts
to match the default Latex fonts. When I try using it in Octave, I
get
an error.
I know the way Matlab does plots and the way Octave does plots are
different, so I wouldn't really expect laprint.m to work. Is there a
similar way to make plots nice for Latex in Octave?
Also, is there a way to get rid of the "Line 1" legend that is on
plots by default?
Thanks,
Ana
--
"Come now, do you really expect me to do coordinate substitution
in my
head while strapped to a centrifuge?"
_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave
--
View this message in context: http://www.nabble.com/Plots-and-Latex-
tf3411180.html#a9543117
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave