[CentralOH] Simple XY Graphing

Austin Godber godber at gmail.com
Sun Dec 4 00:09:30 CET 2011


Matplotlib is fantastic, I don't dispute that in the slightest.  But
as it turns out, the dygraphs library is pretty simple.  I have been
wanting to provide dynamic plots of spectra, rather than just static
image (mainly to easily enable and disable different lines).

With just some simple HTML and an already existing CSV file, I can put
this graph up in just a few seconds:

http://s3.godber.org/spectra/index.html (see the source)

http://s3.godber.org/spectra/mcwmonof0_norm_debayer_B.csv

Austin



On Sat, Dec 3, 2011 at 2:46 PM, Mark Erbaugh <mark at microenh.com> wrote:
> Austin,
>
> Thanks.  I think my graphing needs are really simple. No need for anything fancy. I think a simple image (bmp or png or gif).  Right now the rest of the application runs w/o Javascript.
>
> Mark
>
> On Dec 3, 2011, at 3:48 PM, Austin Godber wrote:
>
>> You could generate the data in python and then use a javascript
>> library to generate a chart.
>>
>> http://dygraphs.com/
>>
>> Or any of the things here http://delicious.com/godber/javascript+chart
>>
>> The benefit is you could do more dynamic things than with an image
>> (reporting values while hovering over the points).  A disadvantage of
>> course is that static images are readily supported across browsers.
>>
>> This
>>
>> On Sat, Dec 3, 2011 at 8:13 AM, Thomas Winningham <winningham at gmail.com> wrote:
>>> For fully customized and accurate scatter plots for statistics, I
>>> think Eric's suggestion can't be beat on Python. I've played with a
>>> lot of other libraries for just really basic and general drawing, and
>>> those include PyCairo, PySVG, Python Imaging Library (just manipulate
>>> pixels) and then OpenGL things such as PyGame, NodeBox, etc ...
>>> PyCairo and PySVG are great for print, but the fastest way to get a
>>> bitmap is maybe PIL?
>>>
>>> On Sat, Dec 3, 2011 at 10:02 AM, Mark Erbaugh <mark at microenh.com> wrote:
>>>>
>>>> On Dec 3, 2011, at 9:16 AM, Eric Floehr wrote:
>>>>
>>>> Mark,
>>>> I'd use matplotlib.  The book "Matplotlib for Python Developers" has examples for dynamically generating graphs within Django and Pylons.  I'm sure there are also examples on the web.
>>>> If you want to use a client library, so you can have hover-overs, etc. or ajax... I use the javascript plotting library Highcharts http://www.highcharts.com/  it's free for non-commercial use.
>>>> -Eric
>>>>
>>>> Eric,
>>>> Thanks.  I don't know anything about it, but I wonder if Matplotlib is overkill for what I need.  I don't need the hover-overs (at least not now).
>>>> Mark
>>>> _______________________________________________
>>>> CentralOH mailing list
>>>> CentralOH at python.org
>>>> http://mail.python.org/mailman/listinfo/centraloh
>>>>
>>> _______________________________________________
>>> CentralOH mailing list
>>> CentralOH at python.org
>>> http://mail.python.org/mailman/listinfo/centraloh
>> _______________________________________________
>> CentralOH mailing list
>> CentralOH at python.org
>> http://mail.python.org/mailman/listinfo/centraloh
>
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> http://mail.python.org/mailman/listinfo/centraloh


More information about the CentralOH mailing list