|
From: Benjamin R. <ben...@ou...> - 2013-03-25 15:58:11
|
On Mon, Mar 25, 2013 at 11:06 AM, Miriam Degginger <md...@am...> wrote:
> Hi all,
>
> I am working on a correlation chart with pyplot for a monitoring web tool.
> The plot is looking good, but only the strange resolution of axes disturbs
> the view.
>
> In a simple correlation plot, e.g. I want to compare two temperature
> sensors, I expect a line who divides the picture in two halves with an
> angle of 45° (optimal correlation R²=1). That feels natural and you can see
> whether the both sensors correlate or not without a deeper look at the
> exact values. But pyplot shows me a chart, where the x-axis's tick interval
> is larger (108 pixel) than the y-axis's tick interval (77 pixel). In
> attachment you can see my example.
>
> How can I manipulate the axes that they show the same pixel resolution?
>
> I hope I make my case clear. If more information is needed, please tell me.
>
> Thank you very much in advance!
>
> Miriam D.
>
>
Did you try:
ax.set_aspect('equal')
I don't know how you plotted your figure, so I don't know which matplotlib
objects you have at your disposal. My above example would operate on the
Axes object returned by a call to add_subplot() or plt.subplot().
Cheers!
Ben Root
|