SVG plots
Michael suggested that I tried out SVG images instead of antialiasing PNG images for my graphs here.
Well, here goes:
PNG file:
SVG file:
–
28-46=-18
Michael suggested that I tried out SVG images instead of antialiasing PNG images for my graphs here.
Well, here goes:
–
28-46=-18
This entry was posted on Wednesday, January 28th, 2009 at 11:00 pm and is filed under Fun. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Mailund on the Internet is powered by WordPress with White as Milk
designed by Azeem Azeez. Entries (RSS) and Comments (RSS).
January 29th, 2009 at 1:39 am
I don’t think those are actually svg files. I can’t open them with an svg editor.
They seem to be pngs to me.
January 29th, 2009 at 7:53 am
You know, I believe you are right.
That is weird, ’cause I uploaded svg files, and the html source shows that the source is http://www.mailund.dk/wp-content/uploads/2009/01/no-geo.svg
Well, that file seems to be a PNG :( Don’t know what went wrong.
http://www.mailund.dk/wp-content/uploads/2009/01/geo.svg on the other hand is svg.
I’ll have another look at it :)
January 29th, 2009 at 8:06 am
Right, now there should be one PNG and one SVG file.
Now why the embedded svg file is clipped on the right I don’t know… my html hacking days is far in the past, and I’m too rusty to figure this out right now :(
January 29th, 2009 at 8:36 am
Grrr, this is crazy!
If I embed the svg file from this page http://techrageo.us/2007/04/07/php-and-wordpress-svg-basics/ directly as it is on that page (but with a full URL, of course) it works as expected.
If I embed my own figure the same way, Firefox asks for a plugin. With object tags around it, it displays the figure but completely ignores the dimensions.
This sucks. *And* blows!
January 29th, 2009 at 8:52 am
Okay, now it doesn’t work at all :(
With object tags at least it displayed before, but now I just get a missing plugin image…
Help, anyone?
January 29th, 2009 at 9:21 am
Hi,
Looks very good. The text is better rendered than the old PNG’s. And it scales :-)
To embed use the following (replace brackets):
[object type="image/svg+xml" data="geo.svg"]
Browser does not support SVG files!
[/object]
January 29th, 2009 at 9:37 am
Yeah! That works, thanks! I used “src” instead of “data” in my object tags, and that f*cked it up.
Got that “src” from an example web page somewhere, but I cannot find it right now.
Do you have any idea why the embed tag — that works for other files — didn’t work for mine?
January 29th, 2009 at 9:50 am
To control the size of the SVG from your tags, you use something like:
[object type="image/svg+xml" data="geo.svg" width="200px" height="200px"]
Browser does not support SVG files!
[/object]
This works for Firefox. In order for this to work under Safari as well, you will have to remove the hardcoded ‘height’ and ‘width’ attributes inside the SVG xml. Otherwise you will get clipping.
Btw, the first image (the PNG file) refers to what actually is a PNG-file, but with a .SVG file extension. Weird.
January 29th, 2009 at 10:24 am
The ‘embed’ tag is not part of the HTML 4 or XHTML 1 standard. It is an obsolete and non-standard way of inserting objects. It will be part of HTML 5, though :-)
January 31st, 2009 at 1:36 am
Just try Ctrl+ and see the difference between SVG image and its PNG counterpart