thanks Phlip for the helpful comments, some replies-
Regarding your suggestion of using Gruff graphs-
the big problem with Gruff graphs that makes it unusable for me is that
it does not support x,y plotting - that's basic scientfic plotting of
an array of x values and a corresponding array of y values. This is the
reason I was forced into using rgnuplot.
But what's wrong with leaving the pictures in public/images? If you re-hit
the same image can you avoid repainting it, and let all the caching systems
take over from there?
A good idea but the chances of the same graph being required two times
is very unlikely. Also, the user types query information into a form
and then the graph is generated. There is no clicking on images.
I would give each plot the same name and let nature take its course!
The images need to have unique names because the user usually generates
many graphs from one query and observes them on one page.
If you learn what Gruff::Base#to_blob does, but don't want to switch to
Gruff, you could let GnuPlot write the file, then read it, blob it, and
delete it. Then it goes out your wire embedded into your HTML stream.
Not quite sure what you mean - but I will look into it.
If the site were in-house, I would just write lots of plots and then
garbage-collect them at midnight every night.
I think this might be a satisfactory way of doing it - any tips on the
In terms of premature optimization, a short file that is written, read, and
deleted might never actually make it to a modern hard drive, so don't worry
about the overhead of apparently writing a file!
A quite large problem I have is that the time it takes for the file to
be written is longer than the time it takes rails to display the view -
I often get broken images (a red cross in place of image). When I
*right-click -> show picture* the image then appears - obviously not a
satisfactory situation. Does anyone have any ideas on how to prevent