The position of the legend is determined at drawing time, so it is a
bit tricky to get it right.
I recommend you to use "annotate" instead.
ax = subplot(111)
ax.plot([1,2,3], label="u=2,p=3")
leg = ax.legend()
ann = ax.annotate("Test 2", xy=(0.5, 1.), xycoords=leg.get_frame(),
xy
If you want full control of label coordinates, you need to use
"Axis.set_label_coords" method. For example,
ax = gca()
ax.xaxis.set_label_coords(0.5, -0.1)
And alternative way is to adjust the padding between the axis and the label.
ax.xaxis.labelpad = 0
Regards,
-JJ
On Mon, Mar 21, 2011 at
Unfortunately, ticks in colorbar axes work differently. Use something
like below instead.
cb.formatter.set_scientific(True)
cb.formatter.set_powerlimits((0,4))
cb.update_ticks()
Regards,
-JJ
On Mon, Mar 21, 2011 at 11:26 PM, johanngoetz wrote:
>
> Is there a way to set the style and scilimit
OK, thanks. I got the same behavior using Python (instead of ipython).
Non-interactive usage has not yet been implemented in the MacOSX backend. We
should be able to fix the bug that you found when implementing
interactive/non-interactive usage for the MacOSX backend.
Thanks,
--Michiel.
--- On
Adrian HILL, on 2011-03-23 19:42, wrote:
> Hi, I am new to python and matplotlib and have a small question.
>
> Is there a way to autoscale the y axis for the current x range in view?
>
> Currently, my y axes are scaled to all the data.
Hi Adrian,
there isn't a built-in way of doing this at th
I'm not sure if this is going to work to solve an issue I'm having, but I'd
like to try it before asking a much more complex question. I have a
function, loose_autoscale_view(), that is based on the autoscale_view
function in mpl but allows margin arguments to push the margins out a bit
more.
I'd
Hi, I am new to python and matplotlib and have a small question.
Is there a way to autoscale the y axis for the current x range in view?
Currently, my y axes are scaled to all the data.
Thanks
Adrian
--
Enable your so
Greetings again, Michiel. Please excuse my slow response time...
First, thanks for explaining the Framework stuff; it clarifies situation.
I'll be sure to never blame the OSX backend where it is not warranted!
Unfortunately (in terms of easy explanations):
In [3]: MacOS.WMAvailable()
Out[3]: Tr
On Wed, Mar 23, 2011 at 8:43 AM, Sean Lake wrote:
> Hello all,
>
> I need to draw different hatch styles on the different groups of a stacked
> bar chart in order to make a figure that works properly in black and white.
> The devil is, I can't figure out how to do it. When I pass the hatch option
Hello all,
I need to draw different hatch styles on the different groups of a stacked bar
chart in order to make a figure that works properly in black and white. The
devil is, I can't figure out how to do it. When I pass the hatch option a list
of values, I get an error.
A simple example:
from
Appologies if this question has been asked previously. I have done a quick
search of the archives and have been unable to find a similar question:
(I'm quite new to this)
I have a set of data in a numpy array which consists of:
X_Coord, Y_Coord, Z_level
[[x,y,z],
[x,y,z],
[x,y,z],
...
Thanks for your help, I simplified what I was doing and so changed the data,
which is my fault. Here is some data of similar size to the data I am
plotting:
data1 = np.array([22000, 25000, 27000, 32000, 25000])
data2 = np.array([1400, 2200, 350, 300, 270])
When I try to run thi
12 matches
Mail list logo