From: Michel T. <ta...@lp...> - 2022-11-20 19:04:33
|
Le 20/11/2022 à 18:42, Gunter Königsmann via Maxima-discuss a écrit : > Adding new terminals to draw normally is only a very small patch that > accommodates for the ideosyncrasies in the "set term" line. > > Kind regards, > > Gunter. > By the way, here is the patch to add tikz to draw: In grcommon.lisp add $tikz in function update-terminal, that is for example: (let ((terms '($screen $png $pngcairo $jpg $gif $eps $eps_color $canvas $epslatex $epslatex_standalone $svg $x11 $qt $tikz .............. and in file gnuplot.lisp add in function draw_gnuplot instruction to output tikz. For example after ($gif (format ...(get-option '$file_name))) add the following, mostly copied from the gif command: ($tikz (format cmdstorage "set terminal tikz ~a size ~a, ~a~%set out '~a.tikz'" (write-font-type) (round (first (get-option '$dimensions))) (round (second (get-option '$dimensions))) (get-option '$file_name))) Then reload draw and you can do: draw2d(file_name="~/toto",terminal=tikz,explicit(cos(x),x,1,10)); [gr2d(explicit)] which produces, as asked a file toto.tikz in your home, containing: \begin{tikzpicture}[gnuplot] %% generated with GNUPLOT 5.2p8 (Lua 5.3; terminal rev. Nov 2018, script rev. 108) %% dim. 20 nov. 2022 19:55:06 \path (0.000,0.000) rectangle (600.000,500.000); ............. -- Michel Talon |