Hi Brian,

sorry for not replying earlier, too much to do in these days.
>
> I've been using the wxDC backend, which works fine. I'm a little
> confused about the AGG backend - I expect it to require a wxImage for
> drawing (based on the wx binding) but it seems to want a wxDC - or
> might it just not be working and instead defaulting to the wxDC
> backend? Probably I should check with pl_cmd(PLESC_GETBACKEND, ...)

It definitely needs a wxImage, so I'm confused too. You need the agg  
library i any case, and cmake tries to find it. If there is no agg  
library available the backend is also not available and it defaults to  
wxDC. Did you install the agg library?

You already choose one (your email today), and I agree with what you  
have chosen.

Regards,
Werner
>
> For the wxpython interface, I am considering a few conventions, and I
> welcome your comments:
>
> A) The use of the window could look like:
>
> plot_window = PLplotPanel(...)   # create the panel to hold plots
> plot_window.AcquireStream()    # this sets the plplot stream number to
> the right one
> plot_window.plcol0(1)
> plot_window.plenv(0, 10, 0, 1, 0, 0)
> plot_window.plline(xs, ys)
> ...
> plot_window.Redraw()  # force a redraw to show the plot at the end
>
> So the methods look just like the plplot commands. (Or the 'pl' in
> each method name could be dropped, since there is no real possibility
> of a name conflict.) This also requires a light wrapper for each
> function to write it as a method, which is also an opportunity to do
> some sanity checks if needed.
>
> B) Alternatively, it could look like:
>
> plot_window = PLplotPanel(...)   # create the panel to hold plots
> plot_window.AcquireStream()    # this sets the plplot stream number to
> the right one
> plplot.plcol0(1)                          # use plplot commands
> straight from imported plplot module
> plplot.plenv(0, 10, 0, 1, 0, 0)
> plplot.plline(xs, ys)
> plot_window.Redraw()  # force a redraw to show the plot at the end
>
> where the plot_window.AcquireStream() and plot_window.Redraw()
> basically frame the plplot calls - not very object oriented, but the
> binding code is very lightweight.
>
> C) Or, I could rename and recombine the methods to be more pythonic at
> the expense of requiring more documentation, etc.
>
> Do you have a standard approach in mind for this kind of interface, or
> is there some other binding you think I should mimic?
>
> Thanks,
> Brian
> <plplotcapi.diff>


--
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria
DVR-Nr: 0005886

email: sme...@iap.tuwien.ac.at
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
        +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to