|
From: sfeam (E. Merritt) <eam...@gm...> - 2011-04-10 03:06:56
|
I have dusted off various patches, comments and suggestions uploaded
to SourceForge dating back 2 years or so, and with their guidance
have managed to write a set of javascript support routines for the
SVG terminal driver. Since I am largely unfamiliar with both SVG and
javascript, this implementation should be considered fair game for
total replacement if someone more knowledgeable wants to tackle the
project.
SVG documents from the revised driver can now
- toggle display of individual plots by clicking on the
corresponding legend or sample in the key
- toggle the grid on/off by clicking on a grid icon shown
at the bottom left of the plot
- track the mouse position
A regenerated set of online demo pages may be viewed at
http://gnuplot.sourceforge.net/demo_svg_4.5/
Not surprisingly, SVG support in various web browsers and
graphics programs is still dodgy.
Firefox (tested using version 3.6.14)
- Firefox can display and interact with the bare SVG document
or an HTML document with SVG embedded (e.g. the online demos)
- It has various rendering bugs, the most annoying of which is
that it ignores purely vertical lines. Because of this I have
added an ugly hack to svg.trm to displace one end of every
Path element by 0.01 pixel horizontally.
Opera (tested using version 11.01)
- Everything works
Konqueror (tested using version 4.4.3)
- Konqueror displays isolated or embedded SVG documents correctly
but fails to connect to the javascript DOM so that you can
interact with it.
- No support for pattern fill
Chrome
- Chrome displays isolated SVG documents correctly, but fails to
display embedded documents. No interaction.
I'd like to hear about success/failure with Safari or IE.
cheers,
Ethan
|
|
From: Mojca M. <moj...@gm...> - 2011-04-10 09:03:00
|
On Sun, Apr 10, 2011 at 05:06, sfeam (Ethan Merritt) <eam...@gm...> wrote: > I have dusted off various patches, comments and suggestions uploaded > to SourceForge dating back 2 years or so, and with their guidance > have managed to write a set of javascript support routines for the > SVG terminal driver. Since I am largely unfamiliar with both SVG and > javascript, this implementation should be considered fair game for > total replacement if someone more knowledgeable wants to tackle the > project. > > SVG documents from the revised driver can now > - toggle display of individual plots by clicking on the > corresponding legend or sample in the key > - toggle the grid on/off by clicking on a grid icon shown > at the bottom left of the plot > - track the mouse position > > A regenerated set of online demo pages may be viewed at > > http://gnuplot.sourceforge.net/demo_svg_4.5/ > > Not surprisingly, SVG support in various web browsers and > graphics programs is still dodgy. > > Firefox (tested using version 3.6.14) > - Firefox can display and interact with the bare SVG document > or an HTML document with SVG embedded (e.g. the online demos) > - It has various rendering bugs, the most annoying of which is > that it ignores purely vertical lines. Because of this I have > added an ugly hack to svg.trm to displace one end of every > Path element by 0.01 pixel horizontally. > > Opera (tested using version 11.01) > - Everything works > > Konqueror (tested using version 4.4.3) > - Konqueror displays isolated or embedded SVG documents correctly > but fails to connect to the javascript DOM so that you can > interact with it. > - No support for pattern fill > > Chrome > - Chrome displays isolated SVG documents correctly, but fails to > display embedded documents. No interaction. > > I'd like to hear about success/failure with Safari or IE. It seems to work fine in Safari. It takes ages to draw something like http://gnuplot.sourceforge.net/demo_svg_4.5/transparent_solids.html. No, wait. That was not SVG's fault. I have only now realized that the generated graphics are approximately 1 MB and it only took ages do download them. I have only discovered one weirdness. With linespoints clicking on the label only removes the line, not the points of the same plot, but I guess that this is not Safari-specific. Mojca |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2011-04-10 16:36:50
|
On 10.04.2011 11:02, Mojca Miklavec wrote: > I have only discovered one weirdness. With linespoints clicking on the > label only removes the line, not the points of the same plot, but I > guess that this is not Safari-specific. Sure those were actual linespoints, as opposed to something like plot 'foo' w lines, '' w p ? This is a (probably unavoidable) shortcoming of this technique: datasets without a key entry can't be influenced by it. |
|
From: sfeam (E. Merritt) <eam...@gm...> - 2011-04-10 16:26:28
|
On Sunday, April 10, 2011, Mojca Miklavec wrote: > On Sun, Apr 10, 2011 at 05:06, sfeam (Ethan Merritt) > <eam...@gm...> wrote: > > I have dusted off various patches, comments and suggestions uploaded > > to SourceForge dating back 2 years or so, and with their guidance > > have managed to write a set of javascript support routines for the > > SVG terminal driver. Since I am largely unfamiliar with both SVG and > > javascript, this implementation should be considered fair game for > > total replacement if someone more knowledgeable wants to tackle the > > project. > > > > I have only discovered one weirdness. With linespoints clicking on the > label only removes the line, not the points of the same plot, but I > guess that this is not Safari-specific. Huh. I did not see that in any of my testing. Could you please recheck this for the "with lp" variants used in these demos: http://gnuplot.sourceforge.net/demo_svg_4.5/running_avg.html http://gnuplot.sourceforge.net/demo_svg_4.5/dashcolor.html thanks, Ethan > > Mojca > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > |
|
From: Mojca M. <moj...@gm...> - 2011-04-10 19:04:15
|
On Sun, Apr 10, 2011 at 18:26, sfeam (Ethan Merritt) wrote: > On Sunday, April 10, 2011, Mojca Miklavec wrote: >> >> I have only discovered one weirdness. With linespoints clicking on the >> label only removes the line, not the points of the same plot, but I >> guess that this is not Safari-specific. > > Huh. I did not see that in any of my testing. > Could you please recheck this for the "with lp" variants used in > these demos: > > http://gnuplot.sourceforge.net/demo_svg_4.5/running_avg.html That was exactly the example I was testing. It seems that *is* a browser problem then. It works fine in Chrome, but on Safari only the line disapears and the points stay. > http://gnuplot.sourceforge.net/demo_svg_4.5/dashcolor.html In this example I cannot convince the Safari browser to hide anything at all. And points behave weird even in Chrome (when I click on line to hide it, the line over the point in legend is redrawn, so clicking also toggles the line segment crossing empty square - "pi -3" for example). Mojca |
|
From: sfeam (E. Merritt) <eam...@gm...> - 2011-04-10 19:21:02
|
On Sunday, April 10, 2011, Mojca Miklavec wrote: > On Sun, Apr 10, 2011 at 18:26, sfeam (Ethan Merritt) wrote: > > On Sunday, April 10, 2011, Mojca Miklavec wrote: > > It seems that *is* a browser problem then. It works fine in Chrome, > but on Safari only the line disapears and the points stay. For me Chrome doesn't work at all. It displays only a banner "Missing Plugin". But the Google documentation on plugins seems to say that it is really a methods limitation rather than a plugin issue. I.e., if you manually replace <embed src="foo.svg"> with <img src="foo.svg"> then it displays statically but is not interactive. So the bottom line is still that SVG support in the various browsers is unreliable. Does Safari have a javascript error console? If so, you might find a message that hints at the cause of the lines/points problem. If there is some particular construct or sequence of elements that it doesn't like, perhaps we could find a work-around. Ethan > > > http://gnuplot.sourceforge.net/demo_svg_4.5/dashcolor.html > > In this example I cannot convince the Safari browser to hide anything > at all. And points behave weird even in Chrome (when I click on line > to hide it, the line over the point in legend is redrawn, so clicking > also toggles the line segment crossing empty square - "pi -3" for > example). > > Mojca > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > gnuplot-beta mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-beta > |
|
From: Mojca M. <moj...@gm...> - 2011-04-10 19:40:01
|
On Sun, Apr 10, 2011 at 21:20, sfeam (Ethan Merritt) wrote:
>
> So the bottom line is still that SVG support in the various browsers
> is unreliable.
I thought that was clear from the beginning. It is not so much SVG as
JavaScript though.
When Taco was porting MetaPost output to SVG, he complained that no
single SVG editor (including the most popular ones) was able to deal
with most common situations (like figure origin not being at (0,0),
but also many others).
> Does Safari have a javascript error console? If so, you might
> find a message that hints at the cause of the lines/points problem.
There is one. I first get:
<table> is not allowed inside <tbody>. Closing the current <table> and
inserting the new <table> as a sibling. (dashcolor.html:98)
and then all the following lines seem to come from
safari-extension://com.betafish.adblockforsafari-UAMUU4S2D9/dee0fbbe/jquery/jquery-1.4.2.min.js
so maybe it would work without the addblocker. I'm only not sure how
to disable the blocker in a reliable way.
Mojca
|
|
From: <pl...@pi...> - 2011-04-11 07:36:21
|
On 10/04/11 21:39, Mojca Miklavec wrote: > On Sun, Apr 10, 2011 at 21:20, sfeam (Ethan Merritt) wrote: >> >> So the bottom line is still that SVG support in the various browsers >> is unreliable. > > I thought that was clear from the beginning. It is not so much SVG as > JavaScript though. > > When Taco was porting MetaPost output to SVG, he complained that no > single SVG editor (including the most popular ones) was able to deal > with most common situations (like figure origin not being at (0,0), > but also many others). > >> Does Safari have a javascript error console? If so, you might >> find a message that hints at the cause of the lines/points problem. > > There is one. I first get: > > <table> is not allowed inside<tbody>. Closing the current<table> and > inserting the new<table> as a sibling. (dashcolor.html:98) > > and then all the following lines seem to come from > safari-extension://com.betafish.adblockforsafari-UAMUU4S2D9/dee0fbbe/jquery/jquery-1.4.2.min.js > so maybe it would work without the addblocker. I'm only not sure how > to disable the blocker in a reliable way. > > Mojca Hi, firstly thanks for the renewed interest in this feature, it's been a while since I submitted those original patches so I need to reload this from (mental) backup storage. <OT> re the adblocker. Though this special URI is a bit of an odd format it looks like there's some client ID in there. My guess is that will be sufficient for someone having access to the attribution of these IDs to identify the "owner" of the apple licence on which this is running. Do I understand from Mojca's comment that this feature is there by default and active or is this like firefox add-ons that the user choses to install? Form http://safariadblock.com/update.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Extension Updates</key> <array> <dict> <key>CFBundleIdentifier</key> <string>com.betafish.adblockforsafari</string> <key>Developer Identifier</key> <string>UAMUU4S2D9</string> <key>CFBundleShortVersionString</key> <string>2.3.22</string> <key>CFBundleVersion</key> <string>102.3.22</string> <key>URL</key> <string>http://safariadblock.com/AdBlockForSafari.safariextz</string> </dict> </array> </dict> </plist> > So it looks like part of it is "Developer Identifier" , the only google hit on "dee0fbbe" is an archive of this thread , so it looks like that may be a "user ID. " Jquery looks a bit like a SQL lookup. Are they checking a database of known ads ? I would appear to be accessing betafish.com rather than a list local to the browser. Just curious. </OT> Anyway , thanks for the extra effort on SVG, especially the mouse coords, that is one thing I wanted to work on but never had time. Does that give x1,x2,y1,y2 coords like the wxt terminal ? regards, Peter. |
|
From: Mojca M. <moj...@gm...> - 2011-04-11 08:12:30
|
On Mon, Apr 11, 2011 at 09:09, <pl...@pi...> wrote: > > re the adblocker. Though this special URI is a bit of an odd format it It looks exactly the same as Java libraries to me. (It doesn't have to be a valid URL, it just needs to be unique library indentifier.) > looks like there's some client ID in there. My guess is that will be > sufficient for someone having access to the attribution of these IDs to > identify the "owner" of the apple licence on which this is running. > > Do I understand from Mojca's comment that this feature is there by > default and active or is this like firefox add-ons that the user choses > to install? I probably installed it manually one day (and more or less forgot about it). It is quite possible that there is a bug in addblocker, so I wouldn't worry about the problem that I reported unless other people observe it as well. (I'm not going to reinstall Safari. It is bad enough that I cannot print anything since the 10.6.7 update, I don't want to mess with the system even more.) Mojca |
|
From: Ethan A M. <sf...@us...> - 2011-04-11 16:48:18
|
On Monday, April 11, 2011 12:09:19 am pl...@pi... wrote: > Anyway , thanks for the extra effort on SVG, especially the mouse > coords, that is one thing I wanted to work on but never had time. > > Does that give x1,x2,y1,y2 coords like the wxt terminal ? At present it is echoing x1 y1 directly to the current mouse position. You can see how it works at the demo page. For polar mode plots it instead echos the polar coordinates. I wasted a lot of time trying to make it write the coordinates to a separate optional HTML element as the canvas terminal does. In the end I concluded that there is no portable way to do this, if it is even possible at all. An alternative that I did not pursue would be to reserve space at the bottom of each SVG figure where mousing information is written, similar to what you get on the x11 or wxt displays. I don't actually like that as well as either of the other two approaches, but it should be possible. Someone with more SVG smarts than I could probably improve the appearance of the mouse readout in the current scheme. For instance, it can be hard to read the coordinates when they appear on top of a complicated plot or a filled area in a dark color. There must be some way to assign a background color to the bounding region of the text, but I didn't figure out how. Also it would be nice to allow a mouse click to leave the current coordinates printed on the figure, as the other mousing terminals do. I think I know how to do that, but I didn't work on it. Ethan > > regards, Peter. |