My grain of salt:
I use django with matplotlib for a data plotting view in a status 
control app. It is updated every 20sec or so. With plotting embedded in 
my django app and called via ajax i encountered a memory leak within 
numpy and/or matplotlib that caused to crash the server after a week of 
operation or so. I didn't have spare time and will to search for it and 
localize the bug so i considered to outsource the data plot into an 
external (unix) process as a quick+dirty workaround. Giving it some 
command line parameters it yields a .png.
The process is called explizitly every time and thus memory is cleared. 
I have been keeping up django data viewing for several month now without 
any problems.

Maybe you have to take this into account if you want to use matplotlib. 
And maybe this is not true anymore with the newest version of it.

Have fun.

Frank


Markus Becker schrieb:
> Hi,
>
> last week I started something in this direction. Similarly to admin.py
> (which describes how to administrate the data) there is a graph.py,
> which describes how to graph the data. It is still very rough on the
> edges, but you can use matplotlib in graph.py to create a plot of the
> data. Possibly one could also create predefined classes, that create
> specific matplotlib plots without any code in graph.py except for
> annotations, e.g. which data to use as x or y data.
>
> If you are interested, I could send you a svn diff on trunk and a
> sample project. I would be interested in hearing comments on this and
> see whether it could be merged into Django.
>
> BR,
> Markus
>
> On Jun 18, 10:28 pm, jordan <jorda...@gmail.com> wrote:
>   
>> I've been wanting to do a similar kind of project for a long time.
>> Just haven't found anyone else who was interested.
>>
>> So, if anyone wants to try to build something like this, send me a
>> note.
>>
>> Jordan
>>
>> On Jun 18, 2:11 pm, Vincent <vincent.n...@gmail.com> wrote:
>>
>>     
>>> Good question. Don't know. My guess is that if you just want to show
>>> the data in a view using data structures Django knows might be
>>> quicker. However, if you are going to process the data (graphs,
>>> summary stats, etc.) you might prefer to have numpy arrays to work
>>> with.
>>>       
>>> Vincent
>>>       
>>> On Jun 18, 2:02 pm, Blaine Booher <frik...@gmail.com> wrote:
>>>       
>>>> Thanks for the link, Vincent.  Is it easy to have the django view system
>>>> (generic views) use a PyTables data structure, or would that be a pretty
>>>> large feat by itself?
>>>>         
>>>> Definitely worth considering, pyTables boasts great performance.
>>>>         
>>>> Blaine
>>>>         
>>>> On Thu, Jun 18, 2009 at 2:32 PM, Vincent <vincent.n...@gmail.com> wrote:
>>>>         
>>>>> If you have a lot of data pytables may be an option (see link below).
>>>>> It can store data as numpy arrays directly rather than having to
>>>>> convert to such an array after reading from an sql database.
>>>>>           
>>>>> http://www.pytables.org
>>>>>           
>>>>> Vincent
>>>>>           
>>>>> On Jun 18, 1:15 pm, Blaine Booher <frik...@gmail.com> wrote:
>>>>>           
>>>>>> Thank you Rajesh, Vincent, Nick, and Hernan for the helpful suggestions.
>>>>>> This is definitely a route I am going to explore.  I'll post some updates
>>>>>>             
>>>>> to
>>>>>           
>>>>>> the list if anything comes out of it.
>>>>>>             
>>>>>> Would you recommend importing the data into django models and tables, or
>>>>>> keeping the db separate and independent?
>>>>>>             
>>>>>> Blaine
>>>>>>             
>>>>>> On Thu, Jun 18, 2009 at 3:01 AM, Hernan Olivera <lholiv...@gmail.com>
>>>>>>             
>>>>> wrote:
>>>>>           
>>>>>>> I think it would be really great if you can interface with R too.
>>>>>>>               
>>>>> There`s a
>>>>>           
>>>>>>> library to acces to R power from Python, and then from Django.
>>>>>>>               
>>>>>>> 2009/6/18 Nick Fishman <bsdlogi...@bsdlogical.com>
>>>>>>>               
>>>>>>> A friend of mine is using Django with matplotlib to create graphs from
>>>>>>>               
>>>>> CSV
>>>>>           
>>>>>>>> files, and it's turning out pretty well. I haven't yet tried
>>>>>>>>                 
>>>>> googlecharts,
>>>>>           
>>>>>>>> but it looks promising.
>>>>>>>>                 
>>>>>>>> The main difficulty he had with Matplotlib was transitioning to
>>>>>>>> Apache/mod_python after working with the Django development server.
>>>>>>>>                 
>>>>> The
>>>>>           
>>>>>>>> Matplotlib commands he was calling worked fine on his desktop, but
>>>>>>>>                 
>>>>> then
>>>>>           
>>>>>>>> complained of a non-existent X11 connection once he tried the code on
>>>>>>>> Apache. The solution is one additional line of code, and is detailed
>>>>>>>>                 
>>>>> at
>>>>>           
>>>>> http://matplotlib.sourceforge.net/faq/howto_faq.html#matplotlib-in-a-...similar
>>>>>  problems.
>>>>>           
>>>>>>>> Nick
>>>>>>>>                 
>>>>>>>> On Wed, Jun 17, 2009 at 11:08 PM, Vincent <vincent.n...@gmail.com>
>>>>>>>>                 
>>>>> wrote:
>>>>>           
>>>>>>>>> That sounds like a great idea. Something i have been meaning to try
>>>>>>>>> for a while but haven't gotten around to.
>>>>>>>>>                   
>>>>>>>>> For a class website i did try to use matplotlib to create graphs from
>>>>>>>>> user provided data within django but couldn't figure out how to get
>>>>>>>>>                   
>>>>> it
>>>>>           
>>>>>>>>> to work smoothly. Ended up using Jacobs googlecharts templates
>>>>>>>>>                   
>>>>> instead
>>>>>           
>>>>>>>>> (see link below).
>>>>>>>>>                   
>>>>>>>>> http://github.com/jacobian/django-googlecharts/tree/master
>>>>>>>>>                   
>>>>>>>>> The following also looks nice.
>>>>>>>>>                   
>>>>>>>>> http://code.google.com/p/google-chartwrapper/
>>>>>>>>>                   
>>>>>>>>> Hope you share code examples.
>>>>>>>>>                   
>>>>>>>>> Vincent
>>>>>>>>>                   
>>>>>>>>> On Jun 17, 4:21 pm, Rajesh D <rajesh.dha...@gmail.com> wrote:
>>>>>>>>>                   
>>>>>>>>>> On Jun 17, 2:06 pm, blaine <frik...@gmail.com> wrote:
>>>>>>>>>>                     
>>>>>>>>>>> Hey guys,
>>>>>>>>>>>   I have a lot of data from various testing samples (simple 2D
>>>>>>>>>>> plotting points) in .csv format.  I am looking to design a system
>>>>>>>>>>>                       
>>>>> to
>>>>>           
>>>>>>>>>>> manage things like plotting, calculations, selecting individual
>>>>>>>>>>> samples and tests, etc. by creating a data manager with an
>>>>>>>>>>>                       
>>>>> intuitive
>>>>>           
>>>>>>>>>>> interface.
>>>>>>>>>>>                       
>>>>>>>>>>> My question: Has anyone used (or heard of using) a Django-powered
>>>>>>>>>>> application as a quick and powerful frontend to a scientific
>>>>>>>>>>>                       
>>>>>>>>> database?
>>>>>>>>>                   
>>>>>>>>>>> It seems to me that the tools built into Django (administration
>>>>>>>>>>>                       
>>>>> site,
>>>>>           
>>>>>>>>>>> generic views & templates) would lend themselves quite easily for
>>>>>>>>>>>                       
>>>>>>>>> this
>>>>>>>>>                   
>>>>>>>>>>> purpose... not to mention that I am already using NumPy and
>>>>>>>>>>>                       
>>>>>>>>> MatPlotLib
>>>>>>>>>                   
>>>>>>>>>>> to plot my data sets so the integration with these tools would be
>>>>>>>>>>> easy.
>>>>>>>>>>>                       
>>>>>>>>>> Yes, it should be.
>>>>>>>>>>                     
>>>>>>>>>> You might even consider taking a representative subset of your
>>>>>>>>>> datamodel and defining it in a sample Django project to see how
>>>>>>>>>>                     
>>>>> that
>>>>>           
>>>>>>>>>> goes.
>>>>>>>>>>                     
>>>>>>>>>> -RD
>>>>>>>>>>                     
>>>>>>> --
>>>>>>> Hernan Olivera
>>>>>>>               
>
> >
>
>   


-- 
Armaturen und Fittings Stüss e.K.
Frank Stüss + Inhaber
Tel. +49+6187-5019 + FAX. +49+6187-91725
Kilianstädter Straße 25 + D-61137 Schöneck
email frank.stu...@stuess.de <http://www.stuess.de>
Sitz Schöneck, HRA5340, Amtsgericht Hanau
USt.-ID: DE252310440


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to