To follow up, if I were to go about this in a brute force manner, by
simply saving the dynamically generated figure to a randomly generated
file and then passing that file to an AREA MAP / IMG tag, where in the
web2py directory structure would be the recommended place to do so? I
suppose using the SQLLITE database might be a natural option. Any
opinions? Are there any examples of doing something like this? I
suppose it's vaguely similar to a photo album application, except the
photos are dynamically created and deleted after use.
Thanks,
G

On Jun 28, 4:50 pm, G <[email protected]> wrote:
> Hello,
> I would like to make a clickable image map of a scatter plot in my
> web2py application. The scatter plot will be dynamically generated. I
> can use the technique that Massimo has shown many times to generate
> matplotlib plots in web2py. The trouble is that the technique relies
> on a controller that returns a cStringIO stream and simply sets the
> headers for the browser to interpret the stream as a PNG image. This
> works fine when you just need to generate a plot. But the techniques
> for generating the corresponding clickable regions for an image map
> require getting the pixel coordinates of the scatter points from the
> plot.
>
> Here are some examples of people generating clickable image maps with
> matplotlib that I am referring 
> to:http://hackmap.blogspot.com/2008/06/pylab-matplotlib-imagemap.htmlhttp://www.dalkescientific.com/writings/diary/archive/2005/04/24/inte...http://www.pageofguh.org/random/668
>
> And here is one of Massimo's examples of using matplotlib with 
> web2py:http://www.web2py.com/appliances/default/show/72
>
> I appreciate any suggestions.
>
> Thanks,
> G

Reply via email to