dkogan / feedgnuplot

Tool to plot realtime and stored data from the commandline, using gnuplot.
Other
711 stars 37 forks source link

can I suggest using feedgnuplot with DomTerm? #45

Closed PerBothner closed 3 years ago

PerBothner commented 3 years ago

Gnuplot has builtin support for the DomTerm terminal emulator, which can display HTML and SVG inline. At least my simple test worked really well, just replacing the --terminal option with domterm:

fgp-dt

The simplest way to try out DomTerm is using DomTerm-X.Y.Z.AppImage

dkogan commented 3 years ago

Looks like it works nicely. I can't take any credit for it: the gnuplot people did all the work.

PerBothner commented 3 years ago

Actually, I added the domterm support to GnuPlot - but it was a relatively minor enhancement to the SVG support that someone else did.

Would you be open to suggesting/recommending using DomTerm in the feedgnuplot documentation, perhaps with a screenshot? Assuming you agree it's a synergistic combination, of course.

dkogan commented 3 years ago

Actually, I added the domterm support to GnuPlot - but it was a relatively minor enhancement to the SVG support that someone else did.

Ah. Got it. Thanks for doing that.

Would you be open to suggesting/recommending using DomTerm in the feedgnuplot documentation, perhaps with a screenshot? Assuming you agree it's a synergistic combination, of course.

One of the selling points of feedgnuplot is that it doesn't do anything special, and allows you to do everything that gnuplot does. So the docs mostly don't favor any terminal over any other. There IS a little bit of special logic to auto-detect the terminal from --hardcopy xxx.pdf (and .svg and .png and .ps). So I can add something, if it makes sense. What were you thinking?

PerBothner commented 3 years ago

Maybe something like the following in the SYNOPSIS (or wherever you think works best):

If you run feedgnuplot from an interactive shell, consider using the DomTerm terminal emulator, which support SVG graphics directly from the gnuplot output if you specify --terminal domterm.

And then perhaps a screenshot that shows something interesting that feedgnuplot can do - I'm sure you can come up with something cool - or you can use the screenshot above.

The domterm support in gnuplot doesn't support animation or updating in-place, but I can work on that if requested.

See also this older blog article

dkogan commented 3 years ago

Hi. I don't think it makes sense to call this out specifically in the docs: there are lots of gnuplot terminals, and this one doesn't fit better with feedgnuplot than the others, in my view.

If you want to promote domterm, I think the #1 thing to do is to get it into the distros. Until I can "apt install domterm", I'm simply not going to try it out. If you want help getting it into Debian, send me an email. I can sponsor your upload.

PerBothner commented 3 years ago

Fair enough. Though how many of these terminals are modern mostly-xterm-compatible and can embed graphics in the REPL output? (Maybe a few that support Sixel output - and some support inline PNG, but DomTerm uses SVG, which I think is better for plots.) Though that may not be as useful for feedgnuplot.

I tried to get domterm into Fedora, but didn't push very hard. Getting it into Debian and Ubuntu would be nice. I don't normally use either (except Ubuntu via WSL), but I can set up virtual machine of some kind. (Worth it for portability testing, if nothing else.) I recently started providing an AppImage, which might be an equally-simple more-portable solution, though not quite as nice as apt install.