On Mon, Nov 5, 2012 at 3:51 PM, Brad Malone <brad.mal...@gmail.com> wrote:

> Hello,
>
> I am trying to plot some small circles in my plotting window, in addition
> to the curves I'm already plotting. If I don't want to set my x- and y-
> axis scales equal to each other, a naive drawing of a circle results in an
> ellipse.  To fix this problem I found some nice example code online here :
> http://stackoverflow.com/questions/9230389/why-is-matplotlib-plotting-my-circles-as-ovals,
> which solves the problem by basically plotting an ellipse, but an ellipse
> which will look like a circle in the display window.
>
> That works all fine for me, but then, if I change my xlim or ylim using
> ax1.set_xlim((something1,something2)) then the solution no longer works,
> and I get an ellipse.
>
> A minimal example showing the breaking behavior can be seen below.
>

I am probably gonna reply to that stackoverflow question with a better
response...

Essentially, you want a similar behavior to the markers in the scatter
plots, right?  As you zoom or resize the plot, the circle markers stay as
circles and have the same size relative to the size of the figure.  If that
is what you want, the way to do that is very easy.

ax1.scatter([0.5], [0.5], s=30)

Or whatever size you want (units of points).

I hope that helps!
Ben Root
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to