From: Matt N. <new...@ca...> - 2005-12-03 19:55:05
|
Hi Ken, That's nice, and coordinated zooming of separate maps is certainly a good feature, but that's not what I had in mind. Sorry I was imprecise and probably hurr= ied. The case is to help visualize L maps of 'element' values that share the same pixel grid (NxM). You make a LxL (in your case 3x3) grid and in each diagonal grid i =3D 1,...L, you draw the map for the ith element. On the off-diagonal cells you draw a 2d plot of pixel intensities for a pair of element: value in element j v. value in element i for all NxM pixels. If elemetns i and j are highly correlated, this plot is a straight line, if they are uncorrelated it's a blob. There may be multiple trends that show (several points with high value for i and lower value for j, say). I think each of the correlation plots is what mpl calls a scatterplot with parameter 's' a scalar. The correlation plot shows trends between element at the expense of spatial information. The maps of individual element intensities shows spatial information at the expense of showing trends between elements. But if you could highlight or mask out selected pixels on a map or regions on a correlation plot (with a rubberband box) and have those those pixels light up or change color on other the maps and 2-element correlation plots, then you can better understand the spatial and correlation data. Does that make sense? I say I believe this would be better handled by GUI code than directly in mpl because someone has to keep track of the pixels for the correlation plot data, then change some set of plot attribute (color, symbol, etc) for those pixels on _all_ the correlation plots and false-color maps. That is, the series of plots has to be managed and altered as a unit in a way that is depends on the data, not by the plot characteristics alone. And presumably the GUI would allow you to change the color used to 'highlight' the selected points. I'm sure it _could_ be done other ways, and perhaps I'm missing something.=20 Anyway, what's wrong with having multiple wx.Panel each of which has a Figure.Axes on it? That's one example.... What about linking together plots in different frames or having draggable panels so that a user can orgranize them on the desktop as they choose? This doesn't have a lot to do with the 'should I use MPlot or wxMPL?' question, and all I'm saying is that as plots get more complicated and have more complex user interaction, some interactions will most naturally be handled at the GUI level. Sorry to stir up flames and run..... --Matt PS: Chris Barker asked: > Matt Newville wrote: > > the users of > > the library should probably not have to know anything about > > matplotlib, because they're going to be asking "I'm writing this wx > > Application and want to include a graph -- what should I use?". > >Huh? to put a graph in your app, you'd need to know the API to create >and manipulate that graph, That API should be MPL's API, why write and >document another one? Well MPlot and wxMPL both did just that (create other APIs). wxMPL is very close (derived from) MPL but it's not identical. I do think the MPL API is a little complicated if all you want to do is make a 2D line plot. With MPlot, it's: plotter =3D MPlot.PlotPanel(...) plotter.plot(x2,y2) plotter.oplot(x2,y2) and MPlot somehow neglects to make the user turn on or select how zooming works, turn on or place the legend (that's a user-configuration) or reveal that a PlotPanel has a FigureCanvas has a Figure which has an Axes which plot()s. Yes, it is less general than MPL, but it's simpler to use and includes functionality that MPL does not have. It's simply a different thing: it's not MPL, but it does use MPL to achieve its ends. So a wxPython plotting widget based on MPL doesn't need to expose the MPL API. If you want the MPL API, it already exists. I used this for MPlot (nothing else existed) -- it works fine. One of the questions here is whether it might be worth it to use the additional layer of wxMPL in MPlot. I could be convinced, and would not mind if someone else did this, but I'm not sure how big the gain would be. |