Alexander Mashin
Alexander Mashin

Reputation: 4537

Print a graph to standard output in Maxima

Is there a way in Maxima to print a graph, in SVG form, or as commands for Gnuplot, to the standard output? Due to the context, in which Maxima is called, it is essential that it is achieved by Maxima commands, not a shell script.

I tried:

but in both cases, files stdout.svg or -.svg (with the expected graph) were created in the current directory.

Upvotes: 0

Views: 66

Answers (1)

vht981230
vht981230

Reputation: 4946

You could use printfile method to print the file content to stdout, although with this approach the file still exists in local directory

echo 'draw2d( explicit (x ^ 2, x, -1, 1), terminal  = svg, file_name = "output_file")$ printfile ("output_file.svg")$' | maxima --very-quiet

Upvotes: 1

Related Questions