In the past I've tried unsuccessfully to create a multi-part web document using GD. After getting frustrated, I ended up pointing the IMG tag directly to the GD script (i.e. <IMG src="myscript.pl">), passing all the parameters needed right in the HTML document. The script outputted an image stream to STDOUT, which the IMG tag correctly displayed.
That said, I was behind a firewall, and the page was for internal consumption. I don't know if there are any security concerns creating the graphics in this manner for an external site. Also, I am sure this is not the most efficient way of doing it. I'll see if I can dig up the old code snippet that I had and pass it along (it's been over 5 years since I did this). I would be interested in seeing how to create a multi-part html steam, one that includes both graphics and text. Hope this helped. Tal -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alex Brelsfoard Sent: Tuesday, December 06, 2005 4:02 PM To: Ricker, William Cc: boston-pm@mail.pm.org; Richard J. Barbalace Subject: Re: [Boston.pm] Pretty Graphs with Perl Does anyone who has/does use GD::Graph know if there's an easy way to embed the output graphs into HTML. Basically I'd like to be able to print a bunch of HTML, then the graph, then some more HTML. I've got the grph coming out all fine and dandy. Thanks. --Alex On 12/6/05, Ricker, William <[EMAIL PROTECTED]> wrote: > > Richard, > > > At the risk of being branded a heretic, > > Heretic! :-) (-: Pi, fetch the brazier, would you? :-) > > > I would suggest writing such a complex application in Java. > > Anything written in Java _becomes_ complex. The reason to write in Java > is if the massive Apache + Struts + JBoss/WebLogic/Websphere > super-framework is a killer app for your problem, or someone requires > it, or you have to plug into some legacy Java. Alex, the original > poster, should know already if that's the case. > > Alex, > > I've had good results with GD::Graph and the ::Chart:: versions thereof > -- except when I let the libgd library differ from the Perl version. > > I haven't used plot(1) in so long it wasn't called gnuPlot yet, but a > shell or Perl that shells out to (gnu)Plot is a classic, as has been > mentioned previously. > > Alternatively, O'Reilly ONLamp has a nice article on simple graphing and > analysis with Gnu R posted last month > http://www.onlamp.com/pub/a/onlamp/2005/11/17/r_for_statistics.html > [OnLamp.com seems to be down at this time!?] There's even a partial > interface to Perl via PDL > http://search.cpan.org/~cavanaugh/PDL-R-math-0.12/rmath.pd , but it's > not for driving charts; PDL has it's own PDL::Graphics::* modules, which > is yet another alternative if you have enough data to be worth the > efficiencies of PDL (Perl Data Language, which uses the FORTRAN > libraries). > > If you're on one of those Redmond-style OS's, you could probably use the > Perl Spreadsheet modules and Win32::Ole modules to command Excel to plot > graphs too *shudder*. > > There's lots more options on http://search.cpan.org/modlist/Graphics , > not sure which are relevant to your problem. > > Cheers, > > Bill > n1vux > _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm