Newbie question - chaco calling c++ library

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Newbie question - chaco calling c++ library

daspostloch
Hi all,

I sent this to chaco-users some days ago to no avail.
Any ideas here?

For a new project I have a sense that Chaco might give
me quite some improvement, so I want to try it out. But
I need a C++ library's output, too:

Consider a minimal example similar to regression.py :
The user creates some data points and clicks "Calculate".
Instead of some ETS-internal regression magic, a
heavy C++ library is called, returning data which is
somehow additionally visualized within the plot.

Can I do that?

Can/Should I use Chaco? Or what else pythonic?

Need I create python bindings?

Should I follow more along the lines of the wx-python
example (which seems broken)? If so, what are pros and cons?

I have no clue how Chaco works - apologies in case the
above is a stupid question, but if, I'd be glad to hear why.

Thanks in advance, and best regards,
Paul

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question - chaco calling c++ library

Peter Wang
On Jan 13, 2010, at 12:22 PM, daspostloch wrote:

> Consider a minimal example similar to regression.py :
> The user creates some data points and clicks "Calculate".
> Instead of some ETS-internal regression magic, a
> heavy C++ library is called, returning data which is
> somehow additionally visualized within the plot.
>
> Can I do that?

Yes.  Your main feat will not be integration with chaco, but rather,  
calling your C library.

> Can/Should I use Chaco? Or what else pythonic?

Of course, you will find many advocates of Chaco on Enthought-dev.  
Its main strength is building interactive plotting widgets, and the  
ability to easily extend and plug in new plot and interaction types.  
There are

> Need I create python bindings?

Depends on what you want to do.  You should look at ctypes and Cython  
as ways of interfacing to your C/C++ library.  Once you get the data  
back either as a list or a Numpy array, Chaco handles the rest.

> Should I follow more along the lines of the wx-python
> example (which seems broken)? If so, what are pros and cons?

Nah, look at the tutorial slides and examples here:
http://code.enthought.com/projects/chaco/docs/html/user_manual/tutorial_1.html#tutorial-1

> I have no clue how Chaco works - apologies in case the
> above is a stupid question, but if, I'd be glad to hear why.

No worries - hope the above information helps, and let us know if you  
have any other questions.

-Peter


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: Newbie question - chaco calling c++ library

Peter Wang
On Jan 13, 2010, at 12:35 PM, Peter Wang wrote:

> On Jan 13, 2010, at 12:22 PM, daspostloch wrote:
>> Can/Should I use Chaco? Or what else pythonic?
>
> Of course, you will find many advocates of Chaco on Enthought-dev.
> Its main strength is building interactive plotting widgets, and the
> ability to easily extend and plug in new plot and interaction types.
> There are

What I was in the middle of saying (before I sent out the email  
prematurely :) was that there are many good Python packages for  
outputting static plots, and the most popular is Matplotlib.  If you  
are mostly interested in just generating plot images, then it might be  
worth looking at that as well.


-Peter

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev