Loading ...
Sorry, an error occurred while loading the content.

1516Re: [ploticus] Re: PNG output generation from procs Lineplot & ScatterPlot

Expand Messages
  • Stephen C. Grubb
    Jun 3, 2005
      Louis,

      To me this doesn't really sound like it's worth doing, but you know the
      tradeoffs of your particular situation, so of course it's your call. If I
      were considering it I would ask myself if the amount of clock time / CPU
      time / resources to be saved is worth the (significant) amount of personal
      time it will take to dig into the code, understand it, modify it, test it,
      etc. etc.

      -Steve


      On Fri, 3 Jun 2005, Louis Godio wrote:

      > Steve,
      >
      > Here's a brief elaboration:
      >
      > I'm generating lots of lab data in clusters, real-time. After each cluster
      > is generated, I look at line & scatter plots to make a decision as to how
      > I should re-set instrument parameters needed for the next cluster. I keep
      > repeating this untill I get acceptable plots. The clusters are generated
      > by data from lab instruments and c-code that processes the data, then
      > outputs the data to a ploticus script file using PROCS GETDATA, AREADEF,
      > AXIS, SCATTERPLOT and LINEPLOT. I only want PNG output because I store
      > many plots, PNG works well with my other software, and want to keep my
      > file size to a minimum.
      >
      > The ploticus script works fine but
      > I'm convinced I could save lots of time between clusters if I could
      > integrate the above PROCS into my c-code program; so based on your note
      > below I'm now trying to compile c-code for the above PROCS and gd_png.c.
      > I've also downloaded zlib and libpng_1.2.8, and am now trying to compile
      > based on modifying the ploticus main() front-end.
      >
      > I'd appreciate your views on my approach. Is this an overly ambitious
      > quest ? or am I on the right track ?
      >
      >
      >
      >
      > --- "Stephen C. Grubb" <scg@...> wrote:
      >
      > > Louis,
      > >
      > > Could you elaborate on what you're thinking.
      > >
      > > 'plpng' is the same as 'pl' except that when compiled it is linked to
      > > the
      > > GD library version 1.6 (which produces PNG). 'pl' is linked to GD 1.3
      > > which produces GIF. The source code is the same and is freely
      > > downloadable from the ploticus web site.
      > >
      > > Steve
      > >
      > >
      > > On Thu, 2 Jun 2005, Louis Godio wrote:
      > >
      > > > Hi Steve,
      > > >
      > > > I think ploticus PNG is great and currently use it for output
      > > generated by
      > > > the c-code apps I use to analyze my research data.
      > > >
      > > > It would save me a great deal of time if I could compile c-code
      > > > equivalents for procs areadef, x/yaxis, scatterplot and lineplot (PNG
      > > > output only).
      > > >
      > > > Do you think this is an advisable quest ? If so, is the source code
      > > for
      > > > plpng availible to ploticus users ?
      > > >
      > > > lgodio@...
      > > >
      > > >
      > > >
      > > > --- "Stephen C. Grubb" <scg@...> wrote:
      > > >
      > > > > Tobias,
      > > > >
      > > > > it looks like it is always going to put 2 symbols in, but the code
      > > can
      > > > > be
      > > > > easily changed to just show one symbol.
      > > > >
      > > > > to change the src code, edit proc_legend.c
      > > > >
      > > > > else if( LEtype[j] == LEGEND_LINE + LEGEND_SYMBOL ) {
      > > > > /* parm1 is linedetails, parm2 is symboldetails */
      > > > > linedet( &Ltext[LElabel[j]], &Ltext[LEparm1[j]], 1.0 );
      > > > > Emov( x-(seglen+0.1), yy );
      > > > > Elin( x-0.1, yy );
      > > > > symdet( "symbol", &Ltext[LEparm2[j]], symcode, &radius );
      > > > > Emark( x-(seglen), yy, symcode, radius );
      > > > > Emark( x-0.1, yy, symcode, radius );
      > > > > }
      > > > >
      > > > > .... and take out one of the Emark lines
      > > > >
      > > > > .... you may need to adjust eg Emark( x-(seglen*0.5), ... or similar
      > > > >
      > > > > Steve
      > > > >
      > > > >
      > > > > On Tue, 31 May 2005, belgabor wrote:
      > > > >
      > > > > > Hi Steve,
      > > > > >
      > > > > > 1) I feared as much, but thats no real hassle, I can probably live
      > > > > > with #proc rect =)
      > > > > >
      > > > > > 2) Unfortunately either you didn't quite get what I exactly meant,
      > > or
      > > > > > there is a bug in the eps renderer.
      > > > > >
      > > > > > What you get (using your example and in my tests) is a legend
      > > like:
      > > > > > -O---O Label
      > > > > >
      > > > > > What I need is:
      > > > > > --O-- Label
      > > > > > That is, just one symbol and that centered on the line.
      > > > > >
      > > > > > I hope I made myself clearer now =)
      > > > > >
      > > > > > Cheers
      > > > > > Tobias
      > > > > >
      > > > > > --- In ploticus@yahoogroups.com, "Stephen C. Grubb" <scg@j...>
      > > wrote:
      > > > > > > Tobias,
      > > > > > >
      > > > > > > 1) there's no automatic way that I knowof to do a legend frame
      > > > > > >
      > > > > > > 2) here's an example that does this:
      > > > > > >
      > > > > > > #proc getdata
      > > > > > > data: 5
      > > > > > > 6
      > > > > > > 4
      > > > > > > 4.5
      > > > > > > 7
      > > > > > >
      > > > > > > #proc areadef
      > > > > > > yrange: 0 10
      > > > > > > xrange: 0 5
      > > > > > > frame: yes
      > > > > > >
      > > > > > > #proc lineplot
      > > > > > > yfield: 1
      > > > > > > pointsymbol: radius=0.08 shape=triangle style=fill
      > > fillcolor=blue
      > > > > > > linedetails: color=red
      > > > > > > legendlabel: Curve 1
      > > > > > > legendsampletype: line+symbol
      > > > > > >
      > > > > > > #proc legend
      > > > > > >
      > > > > > >
      > > > > > > -Steve
      > > > > > >
      > > > > > >
      > > > > > >
      > > > > > > On Mon, 30 May 2005, belgabor wrote:
      > > > > > >
      > > > > > > > Hello everybody,
      > > > > > > >
      > > > > > > > I want to use ploticus for the plots in my Ph. D. thesis.
      > > > > > > > Unfortunately my boss sets tight requirements for these plots.
      > > As
      > > > > > > > such, I need to ask two questions regarding legends:
      > > > > > > >
      > > > > > > > 1) Is there any easy way to draw a frame around a legend?
      > > (easy =
      > > > > not
      > > > > > > > using a trial and error approach with a #proc rect)
      > > > > > > > 2) Is there any way to influence the line+symbol style? I need
      > > to
      > > > > have
      > > > > > > > a line in the legend with the symbol in the middle (e.g. like
      > > > > "--O--
      > > > > > > > Blah")
      > > > > > > >
      > > > > > > > On 2) I would also take pointers on where to look in ploticus'
      > > > > code to
      > > > > > > > implement it, if my requirement isn't already possible.
      > > > > > > >
      > > > > > > > Cheers
      > > > > > > > Tobias
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > > Yahoo! Groups Links
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > >
      > > > > > >
      > > > > > > Stephen C. Grubb
      > > > > > > Scientific Software Engineer, The Jackson Laboratory
      > > > > > > 600 Main Street Bar Harbor, Maine 04609 USA
      > > > > >
      > > > > >
      > > > > >
      > > > > >
      > > > > >
      > > > > > Yahoo! Groups Links
      > > > > >
      > > > > >
      > > > > >
      > > > > >
      > > > > >
      > > > > >
      > > > > >
      > > > >
      > > > >
      > > > > Stephen C. Grubb
      > > > > Scientific Software Engineer, The Jackson Laboratory
      > > > > 600 Main Street Bar Harbor, Maine 04609 USA
      > > > >
      > > > >
      > > >
      > > >
      > > > __________________________________________________
      > > > Do You Yahoo!?
      > > > Tired of spam? Yahoo! Mail has the best spam protection around
      > > > http://mail.yahoo.com
      > > >
      > > >
      > > >
      > > > Yahoo! Groups Links
      > > >
      > > >
      > > >
      > > >
      > > >
      > > >
      > >
      > === message truncated ===
      >
      >
      >
      >
      > __________________________________
      > Yahoo! Mail
      > Stay connected, organized, and protected. Take the tour:
      > http://tour.mail.yahoo.com/mailtour.html
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      >
      >
      >


      Stephen C. Grubb
      Scientific Software Engineer, The Jackson Laboratory
      600 Main Street Bar Harbor, Maine 04609 USA
    • Show all 13 messages in this topic