From: Eduardo O. <edu...@gm...> - 2022-11-23 09:39:47
|
On Wed, 23 Nov 2022 at 02:33, Robert Dodier <rob...@gm...> wrote: > > Eduardo, I'm glad to hear you got it working. There is still some > confusion between draw2d and plot2d, and I apologize again for this > messy situation. Ouch! I forgot that! Here's an updated version... After patching share/draw/grcommon.lisp and share/draw/gnuplot.lisp I run/ran this to clean up the files from the previous test, rm -fv /tmp/my* and then I ran this in Maxima: F(x,y) := 2*x^2 - x*y - y^2; level(z) := implicit(F(x,y)=z, x,-2,2, y,-2,2); clevel(clr,z) := [color=clr, level(z)]; clevels : [clevel(red, -2), clevel(orange,-1), clevel(green, 0), clevel(blue, 2), clevel(violet, 5)]; draw2d(file_name="/tmp/mydraw", terminal=tikz, clevels); draw2d(file_name="/tmp/mydraw", terminal=pict2e, clevels); F(x,y) := 2*x^2 - x*y - y^2; set_plot_option ([gnuplot_term, "tikz"]); set_plot_option ([gnuplot_out_file, "/tmp/myplot.tikz"]); plot2d([contour, F(x, y)], [x, -2, 2], [y, -2, 2]); set_plot_option ([gnuplot_term, "pict2e"]); set_plot_option ([gnuplot_out_file, "/tmp/myplot.pict2e"]); plot2d([contour, F(x, y)], [x, -2, 2], [y, -2, 2]); and then this in a shell: cd /usr/share/texmf/tex/ cp -v gnuplot-lua-tikz-common.tex /tmp/ cp -v gnuplot-lua-tikz.sty /tmp/ cd /tmp/ cat > mydraw-tikz.tex <<'---' \documentclass{article} \usepackage{tikz} \usepackage{gnuplot-lua-tikz} \begin{document} \input mydraw.tikz \end{document} --- cat > mydraw-pict2e.tex <<'---' \documentclass{article} \usepackage{pict2e} \usepackage{xcolor} \usepackage{graphicx} \begin{document} \input mydraw.pict2e \end{document} --- cat > myplot-tikz.tex <<'---' \documentclass{article} \usepackage{tikz} \usepackage{gnuplot-lua-tikz} \begin{document} \input myplot.tikz \end{document} --- cat > myplot-pict2e.tex <<'---' \documentclass{article} \usepackage{pict2e} \usepackage{xcolor} \usepackage{graphicx} \begin{document} \input myplot.pict2e \end{document} --- # These work: lualatex myplot-tikz.tex lualatex myplot-pict2e.tex xpdf myplot-tikz.pdf xpdf myplot-pict2e.pdf # These don't: lualatex mydraw-tikz.tex lualatex mydraw-pict2e.tex The lualatex mydraw-pict2e.tex fails with: ! Dimension too large. <recently read> \unitlength l.11 \begin{picture}(360000,300000)(0,0) and the lualatex mydraw-tikz.tex fails with: ! Dimension too large. <recently read> \pgf@xx l.4 \path (0.000,0.000) rectangle (600.000,500.000) ; Cheers, Eduardo... |