I occasionally use the scatter() function to make light
> curves of astronomical targets. The scale of the x-axis is
> often given in days with a range of 0.54 - 0.68 days. The
> y-axis is in counts. This type of data produces unusual
> scatter plots with the blue symbols being very elongated
> ovals (in the x-direction).
> Are there plans to change this behavior - maybe by drawing
> the symbols in device space instead of data or user space?
There are a couple of ways to do this.
The line style provides markers, the sizes of which are in points. If
you want fixed size markers independent of data coords, you can use
plot with the 'o' marker symbol (or any other marker symbol), and then
set the marker size, facecolor, and edgecolor, as you desire
markers = plot(x, y, 'o')
set(markers, 'markersize', 20)
set(markers, 'markeredgecolor', 'k')
set(markers, 'markerfacecolor', 'b')
The set function takes a sequence of markers and applies the arguments
to all of them. To control the marker properties separately, you can
do (for example)
rgbs = [ ... ] # a len x list of rgb tuples
sizes = [ ... ] # a len x list of marker sizes in points
for m, rgb, size in zip(markers, rgbs, sizes):
m.set_markerfacecolor(rgb)
m.set_markersize(size)
See the documentation for matplotlib.lines for more info.
Patches (which is what scatter and hist create) on the other hand, are
in data coordinates by default. This too can be changed by setting
the transformation functions. You can, for example, specify the
patches in relative (0, 1) axes coords with a little extra work. All
the figure "Artists" can be placed with arbitrary transforms -- see
matplotlib.transforms for more info. Many of these features could use
some better documentation....
My guess is that you will be happy with the line markers -- let me
know.
JDH