From: Darren D. <dd...@co...> - 2007-02-21 10:58:02
|
On Wednesday 21 February 2007 2:45:25 am Eric Firing wrote: > Matthew Auger wrote: > > Ah...right. That works well enough (I believe that I originally had > > editted backend_bases to circumvent the format_coord call--clearly not > > the best solution)! I don't know of a good reason to *not* use the axis > > formatting, but perhaps an rcparam could control this? > > I don't know what the historical reason for the present default is, but > one candidate is speed: the coordinate numbers get reformatted and > printed at a great rate as the cursor moves across a plot, so one might > not want to have the formatting done by a big chunk of python code. > format_data_short will typically be faster than format_data. Here is the reason format_data_short was added: the x,y coordinates of the cursor used to be printed to 10 digits, something I added when I was working out the offset ticklabels for the x and y axis. These coordinates, when rendered into the toolbar, were causing the figure window to resize to make room for the numbers in the toolbar. format_data is also used to format the ticklabels, so John suggested the new method. At the time, we needed a quick work around. Maybe it's time to give it another look, and see if there is a better long-term solution. Darren |