Reputation: 4537
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:
echo 'draw2d( explicit (x ^ 2, x, -1, 1), terminal = svg, file_name = stdout)$' | maxima --very-quiet
andecho 'draw2d( explicit (x ^ 2, x, -1, 1), terminal = svg, file_name = "-")$' | maxima --very-quiet
but in both cases, files stdout.svg
or -.svg
(with the expected graph) were created in the current directory.
Upvotes: 0
Views: 66
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