has2k1 / gnuplot_kernel

A Jupyter/IPython kernel for gnuplot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SVG support?

kaihendry opened this issue · comments

How come SVG doesn't appear to work here?

https://s.natalian.org/2020-07-09/svg-gnuplot.png

# git rev-list --count master
$commits << EOD
gecko 716280
webkit 226748
blink 400000
EOD

set terminal svg
set yrange [0:*]      # start at zero, find max from the data
set boxwidth 0.5      # use a fixed width for boxes
unset key             # turn off all titles
set style fill solid  # solid color boxes
set ytics format "%.0s%c" #  will generate labels 100k 200k 300k ... 1M
set title 'commits'
plot '$commits' using 2:xtic(1) with boxes

Sidenote: Learned about this project via Lee Philips of the gnuplot 5 book. The ctrl+enter workflow that Jupyter Notebook in a browser offers is far easier than working on the command line. Is this experience offered on a public URL somewhere? Or can it be? (happy to host)

Use inline magic to set the inline plotting to svg. e.g.

%gnuplot inline svg
plot ...

Can't quite understand what I need here: https://s.natalian.org/2020-07-09/svg-jplot.mp4

hmm, bit confused by the magic https://s.natalian.org/2020-07-09/magic.mp4

Thank you!