Again, I know little about the current state of Windows-land, but I can 
explain how the other backends have played out, and I assume the basics 
are the same.

You have basically two choices -- a) write a backend that converts all 
the matplotlib drawing calls to WPF gc calls or b) write a backend that 
uses Agg to draw, and transfers the image buffer to a window.  b) will 
be significantly less work, and give you *identical* results which have 
already been heavily tuned for high quality, but it *may* be 
theoretically less-efficient than a).  Probably not enough so to worry 
about.

So what you need to figure out is, given an image buffer (2D array of 
rgba pixels), which .net/WPF API call(s) you need to blit that to the 
screen, and how can you make those API calls from IronPython?  Try to 
make a simple IronPython script that fills a Numpy array with image 
data, creates a window and draw the image in it (just leave matplotlib 
out of it for your experiments).

Given that, you could use one of the backends that takes the (b) 
approach (such as backend_tkagg.py) as a guide to write one for .net.

Mike

V Srikanth wrote:
> Looks like I am not making much progress. I have no problems using 
> IronPython - this is a C# application running on Vista, so it is 
> platform dependent. I also realized that any Windows Forms control can 
> be used in WPF, so if any one knows how to integrate matplotlib with 
> Windows Forms, please tell me how to do it.
>
> From what I understand matplotlib needs a graphics context to plot its 
> graph. If I can create the gc in Windows Forms and pass it to 
> matplotlib perhaps I can do what I want - but how do I do this using 
> IronPython?
>
> Solving this problem will be a great relief - the charting packages on 
> WPF are terrible and the licensing/pricing is ridiculous (see
> http://www.softwarefx.com/sfxNetProducts/ChartFX/wpf/licensing.aspx)
>
>
> ------------------------------------------------------------------------
> Get easy photo sharing with Windows Live™ Photos. Drag n’ drop 
> <http://www.microsoft.com/windows/windowslive/photos.aspx>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It is the best place to buy or sell services for
> just about anything Open Source.
> http://p.sf.net/sfu/Xq1LFB
> ------------------------------------------------------------------------
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>   

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to