problem with scatter legend entries with dpi != 72

Hello,

I am encountering a problem with the legend entries for scatter plots when setting a figure DPI different from the default of 72. When the DPI is higher than 72, the markers in the legend become disproportionately large and get scrunched together. It looks like what is happening is the marker size is being transformed twice, and the offsets are not being transformed at all.

I have tried to debug it, and it looks like the problem is the way that the DrawingArea that contains the legend interacts with the Collection object. To fix the spacing, the _transOffset property of the Collection needs to be set, but the transform being applied by the DrawingArea ends up scaling the marker size instead.

I have attached a sample script which shows the problem. I am using the current development version of matplotlib checked out from git, with Python 2.6.2. The issue also exists in version 0.99.1.

Thanks,
Ray Speth

scatterdbg.py (255 Bytes)

Thanks for the report.
A fix has been committed in r8191 (maint. branch) and r8292 (head).
Give it a try and let me know of any problems.

Regards,

-JJ

ยทยทยท

On Sat, Mar 13, 2010 at 4:49 PM, Ray Speth <speth@...608...> wrote:

Hello,

I am encountering a problem with the legend entries for scatter plots when
setting a figure DPI different from the default of 72. When the DPI is
higher than 72, the markers in the legend become disproportionately large
and get scrunched together. It looks like what is happening is the marker
size is being transformed twice, and the offsets are not being transformed
at all.

I have tried to debug it, and it looks like the problem is the way that the
DrawingArea that contains the legend interacts with the Collection object.
To fix the spacing, the _transOffset property of the Collection needs to be
set, but the transform being applied by the DrawingArea ends up scaling the
marker size instead.

I have attached a sample script which shows the problem. I am using the
current development version of matplotlib checked out from git, with Python
2.6.2. The issue also exists in version 0.99.1.

Thanks,
Ray Speth

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel