-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any tips for added interactivity? #26
Comments
If you cannot do it with normal gnuplot on the command line, then it is definitely not possible. |
Well there is interactivity for example upon http://gnuplot.info/demo_canvas_5.2/ Example on the right has zooming and pointer co-ords capabilities. Not sure if that's reproducible in a Notebook. |
I did not know about the canvas! The canvas output is a full html document with links to system javascript, css and image files. While Jupyter Notebook can display HTML, it does not like links that point elsewhere on the filesystem. So the canvas as generated cannot be shown and we need to do some very mess manipulations of text and files. |
Canvas aside, I've seen interactive SVGs produced by Gnuplot. For example: https://s.natalian.org/2020-08-24/interactive.svg from https://lwn.net/Articles/723818/ I want this same experience within a Notebook. 😬 But oddly, in the context of a Notebook, mouse behaviour is not the same: I can't seem to even export the embedded SVG to have a closer look: |
Interactive SVGs in notebook work. And if you choose to save to a file, it works as well. %gnuplot inline svg mouse standalone
#set out "file.svg" # Uncomment to save to a file
set datafile separator comma
set xlabel '% eligible entering 1st grade' font ",16"
set ylabel '% youth literacy' font ",16"
unset key
set yr [50:110]
set xr [10:110]
set style fill solid 0.5
plot "< sort -t, -k4 -gr htxt.dat" using 2:3:1:(log($4/100000)) \
with labels hypertext point pt 7 ps var lc rgb "violet", \
"" using 2:3:(log($4/100000)) with points pt 6 lc "red" ps var notitle |
I know the save to file works, but the idea is to iterate within a notebook and see the hypertext labels! |
Is it possible to generate graphs with interactivity, so that when you hover a mouse over a value it shows some title-esque tooltip?
https://github.com/kaihendry/covid19-sg/blob/master/gnuplot.ipynb
The text was updated successfully, but these errors were encountered: