From: Matt N. <new...@ca...> - 2005-12-02 21:20:10
|
Ken, >>>That being said, it would be frustrating if you had to periodically rewr= ite >>>the user interaction code to add support new things, like subplots and >>>overlapping Axes. Providing this kind of support initially was an impor= tant >>>goal while writing WxMpl. >> >> Oh the 'user-level support code' is definitely the larger part of the >> work for adding any plot type. > >I should have been more specific and said "plot-level user interaction cod= e, >like zooming". For example, adding support for subplots means you need to= add >support for picking out which Axes object the user has drawn the selection >over and rejecting the selection if it overlaps multiple Axes. I think that's just the tip of the iceberg. If you have multiple 'Axes' -- I'd call them multiple graphs --- in an application, the application writer may very well want to let the user decide which plot goes to which graph. How would this be handled? Well, at the wxMPL/MPlot layer --- which means it does not have to be at the mpl layer. If multiple graphs were handled as each one being an instance of a Plotting Panel, that would probably seem quite natural to a wxPython author. They could be layed out anyway you'd like (they wouldn't have to be contiguous or even on the same frame) and the wxPython author could handle wehre 'the blue trace in graph 1' was the same as 'the green trace in graph 2' or scales of two graphs were somehow related. When you take the view of a Toolkit-aware programmer trying to add graphics to their application, the details of the mpl implementation seem less important and a few of its more whizbang features seem pointless, For multi-valued maps as with x-ray fluorescence (that is, a map that is L x N x M for L elements and N x M spatial pixels with L ~=3D 10, N ~=3D M ~=3D 100) whic= h I look at all the time, I very much want a LxL grid (or pick a subset of the L elements and have an L' x L' grid) of graphs that W.S. Cleveland (in 'The Elements of Graphing Data') called "ScatterPlots" (that term has a different connotation now): At each cell along the diagonals of the grid is a NxM false color map for an element's intensity, the off-diagonal cells have the correlation plots for each i,j pair of elements. The user can highlight any patch on any sub-graph and the data points falling in that region are highlighted on all the other graphs. So one can pick out the all the points with highest As levels, and see immediately what the Fe and Zn levels are at those points. I humbly submit that this would be best handled at the GUI level. --Matt |