Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^2: Real time data graphs.

by enhering (Sexton)
on Oct 09, 2006 at 12:56 UTC ( #577162=note: print w/replies, xml ) Need Help??

in reply to Re: Real time data graphs.
in thread Real time data graphs.

The idea is to show only the last n minute period of aquisition and n should be configurable by the user. With the resources available now, the best way to do this seems to be by working with as many Tk points as there are horizontal pixels in the graph and make a transformation on the data so that the data points are represented by Tk points.

But this is makes things unnecessarily complex. The best would be to be able to use imager primitives directly on a canvas, in some way.

Replies are listed 'Best First'.
Re^3: Real time data graphs.
by Koosemose (Pilgrim) on Oct 10, 2006 at 05:50 UTC

    While poking around in the Tk Docs, I noticed Tk::Photo can take a -data option, I was attempting to see if this could lead to a solution by using Imagemagick to generate an image in memory, and use it as the input for the -data option, and just update it via a configure, unfortunately I can't figure out how to get Imagemagick to output the image data in a compatible format (it's ImagetoBlob method doesn't seem to do it quite right) I'm not familiar with any image packages other than Imagemagick, but if you are this may be a valuable route to explore, as you will only have a single image to update.

    Also tried to do a simple writing an image with Imagemagick, as it seems fairly quick at it, and can draw primitives directly as you want. Eh, I'm a little to tired to try offering advice, can't even get my test script to function properly. If you're still having issues by tomorow I'll see if I can't beat Tk and Imagemagick into submission :)

    Happy Coding

    Just Another Perl Alchemist
      Nice info this -data parameter! I'll have a look at it. About Imagemagick, I have no experience with it, but by reading what you've written, it seems to be very similar to Imager. Anyway, it would be very nice to be able to write data in a binary format on Tk::Photo, instead of converting it to string format and deconverting again. Thanks for your help!

        I'm not sure if you'd seen this particular thread or not. It demonstrates that attribute being used in several of the examples. Perhaps it will help...

        Which tk to use and how to show images?


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://577162]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2018-05-27 20:16 GMT
Find Nodes?
    Voting Booth?