|
From: sfeam (E. Merritt) <eam...@gm...> - 2012-09-23 18:04:33
|
On Saturday, 22 September 2012, gn...@di... wrote: > Hi all. > > I tackled the long-standing issue of the x11 terminal not respecting the > requested plot aspect ratio. That's great. As you say, It has been a very long-standing request. > I have a branch that handles this issue similar to the way the wxt > terminal does: > > - inboard driver computes a particular x,y scale factors > - terminal ALWAYS respects this aspect ratio > - resizing the window does NOT touch the aspect ratio > - a replot is required to re-compute the scale factors > > Similar to the qt terminal, I added a replot-on-resize option to make > things 'just work', at the expense of some extra cpu cycles. > > The code works for my test cases, but I had to touch enough stuff to > make me concerned about cases that I missed. How are such changes > tested, usually? I didn't see a test suite. Several demos rely on "set size square", notably including poldat.dem polar.dem These work well with your patch. We don't seem to have a demo that exercises "set view equal xyz". That would be a nice addition. It's hard to make a test suite for manual interaction with the terminal window. What did you have in mind? > The code is in a git repo at > > https://github.com/dkogan/gnuplot > > I'm also attaching a patch for a diff from the latest code in CVS, as > of Sep 2012. > > As an aside, the main reason I'm touching the x11 terminal at all > (instead of just moving to wxt or qt) is that it appears to be much > faster than the newer terminals. Particularly, if you have a 3d plot > with lots of points, interactively rotating the data is noticeably much > snappier with x11. Is this expected? I suppose so. The x11 output goes through fewer layers of processing and buffer transfer. Also it isn't being antialiased or oversampled. Still, for plots containing only points and lines I find the 3D response in both wxt and qt to be perfectly acceptable. Both the wxt and qt terminals allow you to disable antialiasing and oversampling; that may or may not make a noticeable difference to your particular plots. 3D image plots are another story, slower, particularly in qt. Note the following caveat about the speed of qt rendering [from "help set term qt"] The Qt rendering speed is affected strongly by the rendering mode used. In Qt version 4.7 or newer this can be controlled by the environmental variable QT_GRAPHICSSYSTEM. The options are "native", "raster", or "opengl" in order of increasing rendering speed. For earlier versions of Qt the terminal defaults to "raster". It should note that there may be additional platform-dependent rendering options (e.g. "openvg" on symbian). Ethan |