El jue, 20-12-2012 a las 21:27 +0400, Dmitry Shkirmanov escribi?:
> Hello, list. I am trying to plot graph WITH LATEX SYMBOLS by using draw
> package. In order to test whether gnuplot can do this, i wrote simple
> script:
>
> $ cat test.gnu
> #! /usr/bin/gnuplot -persist
> set terminal epslatex size 10.5,6.62 color standalone colortext
> set output 'introduction.tex'
> set xlabel '$2\pi$'
> set samples 200
> plot [-10:10] sin(x)
>
> By running this script one can create files "introduction.tex" and
> "introduction-inc.eps".
> Next, by running "latex introduction.tex" command one can create .dvi
> file with needed graph(xlabel here is created by latex).
>
>
> Now, i am trying to do the same with maxima:
>
> Maxima 5.29.1 http://maxima.sourceforge.net
> using Lisp SBCL 1.0.40.0.debian
> Distributed under the GNU Public License. See the file COPYING.
> Dedicated to the memory of William Schelter.
> The function bug_report() provides bug reporting information.
> (%i1) load("draw")$
>
> (%i2) draw2d(explicit(
> sin(x),x,-10,10),
> user_preamble="
> set terminal epslatex size 10.5,6.62 color standalone colortext;
> set output '~/introduction.tex';
> set xlabel '$2\pi$';
> set samples 200;
> "
> );
> (%o2) [gr2d(explicit)]
>
>
> This creates files "introduction.tex" and "introduction-inc.eps", but
> latex cannot create dvi file. By looking into the "introduction.tex"
> file one can see tnat it contains only part of working code.
>
>
> So, the question is: what have i missed?
It took me a while, but I think I have found the origin of the problem.
First, with current draw from the repository, you can write something
like
draw2d(
terminal = epslatex_standalone,
explicit(sin(x),x,-10,10),
xlabel = "$2\\pi$" ) $
Files maxima_out.tex and maxima_out-inc.eps are generated. If you then
execute
latex maxima_out.tex
the resulting plot does not show any text.
Try now this workaround. Edit maxout.gnuplot and remove these lines:
set obj 1 rectangle behind from screen 0.0,0.0 to screen 1.0,1.0
set style rectangle fillcolor rgb '#ffffff' fs solid 1.0 noborder
Save the changes and execute gnuplot and latex:
gnuplot 'maxout.gnuplot'
latex maxima_out.tex
The latex text should now be shown. Can you try this, please? Remember
to make use of draw.lisp and grcommon.lisp from the repository.
The two lines to be removed have been introduced recently due to a lack
of back-compatibility in Gnuplot 3.6. Their task is to allow background
colors. It seems that the background rectangle hides the Latex text.
--
Mario