Dmitri Gribenko writes: > I'm writing to the list to get some advice about implementation > details of the features. > > Some of the features I want to implement are easy with plplot > (multiple subpages, Bode plots). But I want to ask your advice about > implementing some other features, specifically: > * zoom in/out; > * scrolling when zoomed plot doesn't fit into the window.
The Tk driver has zooming and panning. You might find that it suits your needs. There are cases where one needs something considerably more powerful. My own work, over the last nearly a decade, is in the area of IC physical design. Here we have a situation where there is geometric detail *everywhere* within the bounds of the chip. And the variation in spatial scales ranges from a centimeter to a fraction of a micron. So, roughly 5 orders of magnitude, give or take. In such a situation, you cannot just draw everything, and then leave it to the graphics driver to "redisplay" some zoom zone by running through 100 MB's of vector drawing history looking to see what's in the new field of view. That would just take too long. And, oh, also, there's the business with resolution of the PLplot coordinates as stored in the history buffer. If you zoom in by 10,000 X, then you find that the plot gets "blurry". Things that are supposed to be distinct, get run together by the finite precision representation of the plot data which PLplot uses. To overcome this, we built "zoom handler" support into the Tk driver. If you capture the zoom events you can then handle the redisplay operation in the application. With a structured geometry database (commin in IC CAD applications), you can make intelligent decisions about what to draw, based on the viewport, the size of the viewport in relation to the size of various possible structural elements the user might want to see, etc. This is sort of the opposite of having it be done somehow automatically by the plot library. Rather, you do all the work of intelligent display in tha application. But the result can be dramatically better than anything you could ever hope to get out of a re-rendering of a plot history buffer inside the plotter library. Combining this application-directed intelligent redisplay (triggered in an event driven manner by implementing the zoom handler hooks) with PLplot's support for "double buffering" in the X/Tk driver, lets you build an application which can support extremely efficient and *smooth* (flicker free) transitions as the zoom window changes. So, that's an option. It's a lot of work to set it up, but it can be worth it if your geometric field is sufficiently complex and structured. -Geoff ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel