Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #3405
| From | sfeam <sfeam@users.sourceforge.net> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: svg terminal - use of mouse without <embed> |
| Date | 2016-09-29 09:41 -0700 |
| Organization | gnuplot development team |
| Message-ID | <nsjg88$a4b$1@dont-email.me> (permalink) |
| References | <92a059d0-e40b-4ce8-a6dd-9846105cf434@googlegroups.com> |
Patrik Sundberg wrote: > Hi, > > I'm using the gnuplot svg terminal to produce some SVG. However, I'm > not actually producing files, I'm dynamically generating content which > is dynamically updating a web page via javascript. That means I don't > have the ability to use <embed>, instead I just add a node to the DOM > with the SVG. > > The way the mouse javascript is done it only really works if used as a > separate <embed> so that document.documentElement etc refers to only > that svg. There are also some issues about clashing id's if including > several svg nodes on same page without <embed>. > > I can see it's not a trivial refactor to enable mouse to work in > non-embed case. I wanted to ask if anyone else has this kind of use > case or have thought about the use of mouse without the use of <embed> > ? Any workarounds anyone can think of? I don't have an answer with regard to non-embedded svg, but have you looked at using the HTML5 canvas terminal instead? You would probably want to substitute your own mouse-handling *.js routine for the demonstration one bundled with gnuplot, but that should not require any change to the gnuplot output for the individual plots. > I'll see if it becomes important enough for me to try to write a patch > to allow non-embed mode + multiple SVGs in the same page without ID > clashes. Please have a look at this draft of a patch from Christoph Bersch: https://sourceforge.net/p/gnuplot/patches/532/ It's from quite a while ago and almost certainly won't apply to the current gnuplot source, but if it does what you want please try to update or improve it. Or just add your comments to the tracker item. Ethan > Thanks, > Patrik
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Next in thread | Find similar
svg terminal - use of mouse without <embed> Patrik Sundberg <patrik.sundberg@gmail.com> - 2016-09-28 02:40 -0700
Re: svg terminal - use of mouse without <embed> sfeam <sfeam@users.sourceforge.net> - 2016-09-29 09:41 -0700
Re: svg terminal - use of mouse without <embed> Patrik Sundberg <patrik.sundberg@gmail.com> - 2016-09-30 04:23 -0700
csiph-web