Re: [Matplotlib-users] placing xlabel in the correct place when using tick_top

2009-08-12 Thread Jae-Joon Lee
http://matplotlib.sourceforge.net/search.html?q=set_label_position&check_keywords=yes&area=default ax2.xaxis.set_label_position("top") ax2.yaxis.set_label_position("right") Regards, -JJ On Thu, Aug 13, 2009 at 12:10 AM, Duncan Mortimer wrote: > Hi all, > > I'm trying to produce a graph in whic

Re: [Matplotlib-users] placing xlabel in the correct place when using tick_top

2009-08-12 Thread Duncan Mortimer
Hi all, I'm trying to produce a graph in which two different sets of axes are superimposed, with both x- and y- ticks taking on different ranges. I've managed to get the first set of axes to place its ticks on the bottom and left of the figure, and the second set to place its ticks on the top and

Re: [Matplotlib-users] twinx/twiny usage

2009-08-12 Thread Jae-Joon Lee
On Wed, Aug 12, 2009 at 3:16 PM, Uri Laserson wrote: > Hi, > > I am trying to overlay a few Axes object that need to share axes.  I would > like it to be the case that if I change the properties of one axis (e.g., > scale), the corresponding axis of the other axes will have the properties > changed

Re: [Matplotlib-users] contourf interpolation/smoothness

2009-08-12 Thread Eric Firing
P.R. wrote: > This has probably been asked before, so I apologize... > > Is it possible to improve the smoothness/interpolation used in contourf? > I know that the interpolation can be set for imshow(pcolor?), but I couldn't > see how to set it for contourf. > > Right now, contourf is producing s

[Matplotlib-users] RectangleSelector on demand

2009-08-12 Thread Eli Brosh
Hello, I am trying to use the RectangleSelector widget. In the corresponding example http://matplotlib.sourceforge.net/examples/widgets/rectangle_selector.html the rectangle selector is activated every time I click inside the axes. However, I would like to activate it on demand. For example, suppos

[Matplotlib-users] contourf interpolation/smoothness

2009-08-12 Thread P.R.
This has probably been asked before, so I apologize... Is it possible to improve the smoothness/interpolation used in contourf? I know that the interpolation can be set for imshow(pcolor?), but I couldn't see how to set it for contourf. Right now, contourf is producing some relatively jagged outp

Re: [Matplotlib-users] hexbin density plots in matplotlib?

2009-08-12 Thread per freem
hi all, thank you for your replies. my original message wasn't detailed enough. what i am looking for is a hexbin plot, where points are binned into hexagons and then hexagons are plotted in size proportional to the points in the bin. i think the links provided are very relevant for this, but one

Re: [Matplotlib-users] dynamically add subplots to figure

2009-08-12 Thread Tom Vaughan
Great. That worked. Thanks! -Tom On Thu, Jul 16, 2009 at 11:23, Jae-Joon Lee wrote: > One work around is to call > >  self.figure.subplots_adjust() > > after geometry changed. After this call, the twinx-ed axes will have > the same axes position as the original one. > > Another option is to use

[Matplotlib-users] twinx/twiny usage

2009-08-12 Thread Uri Laserson
Hi, I am trying to overlay a few Axes object that need to share axes. I would like it to be the case that if I change the properties of one axis (e.g., scale), the corresponding axis of the other axes will have the properties changed automatically. I was trying to use twinx/twiny, but this behav

Re: [Matplotlib-users] loading csv data into arrays

2009-08-12 Thread Ryan May
On Wed, Aug 12, 2009 at 10:47 AM, per freem wrote: > hi all, > > thanks for these comments. i tried loadtxt and genfromtxt and am > having similar problems. my data looks like this: > > my;header1 myheader-2_amyheader-2_b > a:5-X:b 3;0;5;0;0;0 3.015 > c:6-Y:d 0;0;0;0;0;0 2.5 > >

Re: [Matplotlib-users] Confused about get_tightbbox() and renderer

2009-08-12 Thread Damon McDougall
Jae-Joon, Brilliant! An even simpler solution! Thank you very much :) Figure.savefig() also takes pad_inches as a keyword argument and it's default is 0.1 inches. If you set it to 0.0 inches it can sometimes crop some of the x-axis label. I have found that if you do fig.savefig("a.pdf", bbox

Re: [Matplotlib-users] pylab

2009-08-12 Thread Eric Firing
marc desmarais wrote: > I found a typo at > "http://matplotlib.sourceforge.net/users/navigation_toolbar.html"; > > "If you press ‘x’ or ‘y’ while panning the motion will be contrained to > the x or y axis, respectively." > Thank you. Now it is fixed. > BTW, do you know how to constrain the pa

Re: [Matplotlib-users] re grid non regular data, then mask for continents / artifacts

2009-08-12 Thread Christopher Barker
John [H2O] wrote: > Impatiently I somewhat double posted (though, actually, I thought this was a > better list than scipy for the question). Regardless... the conversation is > mostly here: > http://www.nabble.com/2d-interpolation%2C-non-regular-lat-lon-grid-td24909685.html One comment: mgrid() i

Re: [Matplotlib-users] problem with matplotlib and latex

2009-08-12 Thread Darren Dale
On Wed, Aug 12, 2009 at 12:22 PM, wrote: > hmm ok i post it in a more shorter way... but with the point raw settings > i dont know how it should works I directed you to the documentation. An improved script is attached. #!/usr/bin/python # -*- coding: utf8 -*- import numpy as np import pylab as

Re: [Matplotlib-users] Confused about get_tightbbox() and renderer

2009-08-12 Thread Jae-Joon Lee
get_tightbbox is a bit experimental feature and it is discouraged for an ordinary user (maybe the method should not be an public method). Unless you understand how the internal transformation thing works, I'm afraid there is not much thing you can do with its return value. Instead, you should use

Re: [Matplotlib-users] problem with matplotlib and latex

2009-08-12 Thread Darren Dale
Try googling "python raw strings" and read the first hit. By the way, please post self-contained scripts that are as short as possible. We can't run the script you posted, the data is missing. On Wed, Aug 12, 2009 at 12:00 PM, wrote: > how i use raw settings ? > >> On Wed, Aug 12, 2009 at 10:4

Re: [Matplotlib-users] problem with matplotlib and latex

2009-08-12 Thread spielmann
how i use raw settings ? > On Wed, Aug 12, 2009 at 10:42 AM, Timo > Spielmann wrote: >> hey people >> >> i have an problem on plotting some functions with latex texts. i cant >> plot some latex symbols like \bar or something else the normal latex >> stuff works perect, but such keys doessent a

Re: [Matplotlib-users] loading csv data into arrays

2009-08-12 Thread per freem
hi all, thanks for these comments. i tried loadtxt and genfromtxt and am having similar problems. my data looks like this: my;header1 myheader-2_amyheader-2_b a:5-X:b 3;0;5;0;0;0 3.015 c:6-Y:d 0;0;0;0;0;0 2.5 i simply want to read these in, and have all numbers be read in as

Re: [Matplotlib-users] Confused about get_tightbbox() and renderer

2009-08-12 Thread Damon McDougall
Sorry, I forgot to use a sensible subject for the email! Regards, --Damon On 12 Aug 2009, at 16:35, Damon McDougall wrote: Hello all, So I'm trying to use matplotlib's OO interface (so programming without using 'from pylab import *') and found this useful page:http://matplotlib.sourceforge.

[Matplotlib-users] Confused about get_tightbbox() and renderer

2009-08-12 Thread Damon McDougall
Hello all, So I'm trying to use matplotlib's OO interface (so programming without using 'from pylab import *') and found this useful page:http://matplotlib.sourceforge.net/leftwich_tut.txt after much googling. My problem is that, in general, after producing a plot, I would open the .pdf p

Re: [Matplotlib-users] problem with matplotlib and latex

2009-08-12 Thread Darren Dale
On Wed, Aug 12, 2009 at 10:42 AM, Timo Spielmann wrote: > hey people > > i have an problem on plotting some functions with latex texts. i cant > plot some latex symbols like \bar or something else the normal latex > stuff works perect, but such keys doessent and i dont know why... > > hope some

[Matplotlib-users] problem with matplotlib and latex

2009-08-12 Thread Timo Spielmann
hey people i have an problem on plotting some functions with latex texts. i cant plot some latex symbols like \bar or something else the normal latex stuff works perect, but such keys doessent and i dont know why... hope someone can help me as you can see i attached a sample plot file... you

Re: [Matplotlib-users] loading csv data into arrays

2009-08-12 Thread Ryan May
On Wed, Aug 12, 2009 at 10:01 AM, Sandro Tosi wrote: > On Wed, Aug 12, 2009 at 16:56, per freem wrote: > > hi all, > > > > i have tab-separated text files that i would like to parse into arrays > > in numpy/scipy. i simply want to be able to read in the data into an > > numpy's loadtxt() With n

Re: [Matplotlib-users] loading csv data into arrays

2009-08-12 Thread Sandro Tosi
On Wed, Aug 12, 2009 at 16:56, per freem wrote: > hi all, > > i have tab-separated text files that i would like to parse into arrays > in numpy/scipy. i simply want to be able to read in the data into an numpy's loadtxt() Regards, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http

[Matplotlib-users] loading csv data into arrays

2009-08-12 Thread per freem
hi all, i have tab-separated text files that i would like to parse into arrays in numpy/scipy. i simply want to be able to read in the data into an array, and then use indexing to get some of the columns, or some of the rows, etc. the key thing is that these columns might be strings or might be nu

[Matplotlib-users] Minor problem with save dialog under Qt

2009-08-12 Thread Alexander Bruy
Hi, I noticed a minor problem when matplolib embedded in Qt and used NavigationTollbar Save button. When I press Save button and select from File type combo some format (PDF or any other) but don't change defaul filename "image" the figure always saved in PNG format. So if i want to save f

Re: [Matplotlib-users] force aspect ratio in basemap

2009-08-12 Thread Jeff Whitaker
Alexander Barth wrote: > Hi all, > > I want to implement a web map server (WMS) using matplotlib/basemap. > The client of WMS does specify the bounding box in lon/lat and width > and height of the image. The spec requires that the server produces > such images without blank spaces around the image.

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread D2Hitman
Darren Dale-3 wrote: > > >> Is it a problem that it is using pdftex instead of pslatex? > > Yes. > > I am trying a few things in matplotlibrc, but cannot change from pdftex... Is there something obvious i am missing? If so what? Cheers. -- View this message in context: http://www.nabbl

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Sebastian Busch
finally... Sebastian Busch wrote: > ... > it does not crash (the version with '\\' does) but does not produce a > line break, either... text(0.5, 0.5, 'a \n b') works. signature.asc Description: OpenPGP digital signature ---

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Sebastian Busch
Darren Dale wrote: >> the example >> >> from matplotlib.pyplot import * >> text(0.5, 0.5, r'a \\ b') >> savefig('test.eps') >> >> runs without error here -- and latex is calling pdftex: > > ... cup of coffee. ... the example was not fair though as it wasn't using latex... this one is now: from

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Darren Dale
On Wed, Aug 12, 2009 at 7:32 AM, Sebastian Busch wrote: > Darren Dale wrote: >> On Wed, Aug 12, 2009 at 7:13 AM, D2Hitman wrote: >>> Is it a problem that it is using pdftex instead of pslatex? >> Yes. > > i don't think so. > > > the example > > from matplotlib.pyplot import * > text(0.5, 0.5, r'a \

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Sebastian Busch
Darren Dale wrote: > On Wed, Aug 12, 2009 at 7:13 AM, D2Hitman wrote: >> Is it a problem that it is using pdftex instead of pslatex? > Yes. i don't think so. the example from matplotlib.pyplot import * text(0.5, 0.5, r'a \\ b') savefig('test.eps') runs without error here -- and latex is callin

Re: [Matplotlib-users] EPS with TeX

2009-08-12 Thread Darren Dale
On Wed, Aug 12, 2009 at 7:13 AM, D2Hitman wrote: > > Hi, > > I am trying to use a text label with a new line in the middle and then save > the figure to .eps > > text(0.5, 0.5, r'a \\ b') > savefig('test.eps') > > This results in: > > RuntimeError: LaTeX was not able to process your file: > Here is

[Matplotlib-users] EPS with TeX

2009-08-12 Thread D2Hitman
Hi, I am trying to use a text label with a new line in the middle and then save the figure to .eps text(0.5, 0.5, r'a \\ b') savefig('test.eps') This results in: RuntimeError: LaTeX was not able to process your file: Here is the full report generated by LaTeX: This is pdfTeX, Version 3.141592