Modern Monks,

I'll be writing a script to generate some graphs as images from scratch. Basic stuff like bar charts of data from an SQL query. Item a = 5, Item b = 13, Item c = 7.5, for example. I'll need to include in the image some textual labelling and titling.

I have never done this before and my nkowledg eof the common modules is what I've read in preparing for this.

Looking at technical options right now.

  1. GD::Graph - as I understand it, generates .png files. Has lots of facilities purpose-designed for creating charts, so will be "relatively" (heavily quialified) easy to get up and running. BUT, just how well do .png files scale when a user copies them off the web page that's returned and trie to paste it into Word, or PowerPoint, or something else to include in their report?
  2. XML::Writer & SVG - I read an interesting article, here:
    http://www.xml.com/pub/a/2001/07/11/creatingsvg.html
    about writing XML-based SVG image files using Perl. It looks slick, AND the images are scalable vector graphics. BUT, as I understand it, SVG is an Adobe format that requires a plug-in in many browsers - although MSIE 6 appears to display it just fine.

Anyone else had to decide between the two, or have an opinion?

Thanks.




Forget that fear of gravity,
Get a little savagery in your life.

In reply to Graphics Creation: GD &.png, or XML::Writer & SVG? by punch_card_don

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.