[Matplotlib-users] [matplotlib-users] How "connect" axes on matplotlib subplots

2012-02-02 Thread Fabien Lafont
Hello! How can I zoom exactly on the same region on two different subplots at the same time. This option is enable when I use plotfile but not if I use plot, and subplots? Thx! Fabien -- Keep Your Developer Skills Curren

Re: [Matplotlib-users] [matplotlib-users] How "connect" axes on matplotlib subplots

2012-02-02 Thread Angus McMorland
On 2 February 2012 08:32, Fabien Lafont wrote: > Hello! > > How can I zoom exactly on the same region on two different subplots at > the same time. This option is enable when I use plotfile but not if I > use plot, and subplots? Create the first axes object, then when you create subsequent ones,

Re: [Matplotlib-users] [matplotlib-users] How "connect" axes on matplotlib subplots

2012-02-02 Thread Fabien Lafont
Thx! 2012/2/2 Angus McMorland : > On 2 February 2012 08:32, Fabien Lafont wrote: >> Hello! >> >> How can I zoom exactly on the same region on two different subplots at >> the same time. This option is enable when I use plotfile but not if I >> use plot, and subplots? > > Create the first axes obj

[Matplotlib-users] [matplotlib-users] Set the color of a plot in argument's function

2012-02-02 Thread Fabien Lafont
I don't manage to put the color of my plot in the argument' list function. Example: def function(color): plot(x,y,'.', color, label = "this is my curve") function('r') even if I put function(" 'r' ") it doesn't work. Any idea? -

Re: [Matplotlib-users] [matplotlib-users] Set the color of a plot in argument's function

2012-02-02 Thread Daryl Herzmann
On Thu, Feb 2, 2012 at 8:52 AM, Fabien Lafont wrote: > I don't manage to put the color of my plot in the argument' list function. > > Example: > > def function(color): > >      plot(x,y,'.', color, label = "this is my curve") > > > function('r') > > even if I put function(" 'r' ")  it doesn't work

Re: [Matplotlib-users] [matplotlib-users] Set the color of a plot in argument's function

2012-02-02 Thread Fabien Lafont
Thanks Daryl, it works! 2012/2/2 Daryl Herzmann : > On Thu, Feb 2, 2012 at 8:52 AM, Fabien Lafont wrote: >> I don't manage to put the color of my plot in the argument' list function. >> >> Example: >> >> def function(color): >> >>      plot(x,y,'.', color, label = "this is my curve") >> >> >> fun

[Matplotlib-users] How "connect" axes on matplotlib subplots

2012-02-02 Thread Sterling Smith
> Hello! > > How can I zoom exactly on the same region on two different subplots at > the same time. This option is enable when I use plotfile but not if I > use plot, and subplots? > > Thx! > Fabien Fabien, When you create the new subplots, add the sharex=ax, sharey=ax keywords, where ax is t

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Benjamin Root
On Wed, Feb 1, 2012 at 4:07 PM, Jim St.Cyr wrote: > Hello- > > Scenario: > > Basemap used to display the East Coast of the US and the Atlantic Ocean. > Shapelib is used read a shapefile the contents of is pumped into a PyPlot > subplot hosted Line Collection which overlays the ocean with a grid >

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Jim St.Cyr
On 2/2/2012 3:41 PM, Benjamin Root wrote: On Wed, Feb 1, 2012 at 4:07 PM, Jim St.Cyr > wrote: Hello- Scenario: Basemap used to display the East Coast of the US and the Atlantic Ocean. Shapelib is used read a shapefile the contents of is pumped into a

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Benjamin Root
On Thu, Feb 2, 2012 at 2:54 PM, Jim St.Cyr wrote: > On 2/2/2012 3:41 PM, Benjamin Root wrote: > > On Wed, Feb 1, 2012 at 4:07 PM, Jim St.Cyr wrote: > >> Hello- >> >> Scenario: >> >> Basemap used to display the East Coast of the US and the Atlantic Ocean. >> Shapelib is used read a shapefile the

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread G Jones
Note there is a typo. Ben assigned the output to "pts" but then referenced "res". On Thu, Feb 2, 2012 at 12:59 PM, Benjamin Root wrote: > On Thu, Feb 2, 2012 at 2:54 PM, Jim St.Cyr wrote: > >> On 2/2/2012 3:41 PM, Benjamin Root wrote: >> >> On Wed, Feb 1, 2012 at 4:07 PM, Jim St.Cyr wrote: >>

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Benjamin Root
On Thu, Feb 2, 2012 at 3:04 PM, G Jones wrote: > Note there is a typo. Ben assigned the output to "pts" but then referenced > "res". > > Good catch! Ben Root -- Keep Your Developer Skills Current with LearnDevNow! The mo

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Jerzy Karczmarczuk
Benjamin Root : > Just about any mpl plotting function (plot(), scatter(), hist(), etc.) > returns an object. Most of the time, users do not save the result > into a variable, but if you want to do advanced tricks, you will need > to save those returns. Sorry for a shameless attempt to add som

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Benjamin Root
On Thu, Feb 2, 2012 at 3:52 PM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Benjamin Root : > > Just about any mpl plotting function (plot(), scatter(), hist(), etc.) > > returns an object. Most of the time, users do not save the result > > into a variable, but if you want to do

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Jerzy Karczmarczuk
Benjamin Root on my suggestion that one can use del instead of remove : There are methods for ax that properly handle removal of types of artists that have been attached to an axes. The above approach assumes that no other collections have been plotted that you wanted to keep. The approach I

Re: [Matplotlib-users] How Clear Points Without Wiping Everything?

2012-02-02 Thread Benjamin Root
On Thu, Feb 2, 2012 at 6:25 PM, Jerzy Karczmarczuk < jerzy.karczmarc...@unicaen.fr> wrote: > Benjamin Root on my suggestion that one can use del instead of remove : > > There are methods for ax that properly handle removal of types of artists > that have been attached to an axes. The above appr