[Matplotlib-users] Only one colorbar for a figure?

2011-01-14 Thread Thøger Emil Juul Thorsen
Hi list; 

I am trying to do an imshow() comparison of four different data sets
(astronomical photos), and since I want to show the differences in
strength, I use fixed vmin and vmax.

I would very much like one and only one colour bar for the entire
figure, but I haven't been able to figure out how to do it without
creating an entire subplot for it, and that is really kludgey and
unhandy.

I tried the Interwebz but have had no luck figuring it out.

Cheers; 

Emil


signature.asc
Description: This is a digitally signed message part
--
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] fill_between with drawstyle steps?

2010-11-09 Thread Thøger Emil Juul Thorsen
Hello ExPyrts; 

I'm trying to do a fill-between part of a spectrum and its continuum
value. I would strongly prefer the drawstyle to be steps, since each
data point represents a bin (or pixel, to be precise).

Attached is a picture illustrating my problem.

Isn't it possible to fill between my step graph and the hline?

Cheers; 

Emil




<>

signature.asc
Description: This is a digitally signed message part
--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Libertine font in Matplotlib?

2010-10-20 Thread Thøger Emil Juul Thorsen
Sorry, perhaps I should have specified; 

I'm using usetex, and Libertine is not among the supported fonts. In the
example RC file, it said that if any font was wanted, that could be
loaded with a \usepackage command, one should request it on the mailing
list.




On Wed, 2010-10-20 at 14:29 -0400, Stan West wrote:
> > From: Thøger Emil Juul Thorsen [mailto:thoe...@fys.ku.dk] 
> > Sent: Monday, October 18, 2010 14:04
> > 
> > I'm using the excellent font Linux Libertine for writing my thesis, in
> > which I do my plotting in matplotlib. I would really love to 
> > be ablu to
> > have consistent fonts in both text and graphs - is this 
> > possible? I know
> > it can be loaded by \usepackage{libertine}.
> 
> For ordinary text objects, one way is to set the font.family rcParam to the
> font name.  You could do this either in a matplotlibrc file in an appropriate
> location or in your code dynamically [1].  If you'll be using mathtext, also
> see the "Fonts" section and "Custom fonts" subsection at [2]; for LaTeX, [3].
> 
> [1] http://matplotlib.sourceforge.net/users/customizing.html
> 
> [2] http://matplotlib.sourceforge.net/users/mathtext.html#fonts
> 
> [3] http://matplotlib.sourceforge.net/users/usetex.html



--
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Libertine font in Matplotlib?

2010-10-18 Thread Thøger Emil Juul Thorsen
Hi all; 

I'm using the excellent font Linux Libertine for writing my thesis, in
which I do my plotting in matplotlib. I would really love to be ablu to
have consistent fonts in both text and graphs - is this possible? I know
it can be loaded by \usepackage{libertine}.

Best;

Emil


--
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Control size of plot window?

2010-08-31 Thread Thøger Emil Juul Thorsen
Hello list; 

I'm putting together a quick animation to demonstrate some physics to my
students. I'm perfectly fine to just have it show in the default plot
window, but by default the window is drawn quite small on my screen. 

Is there a simple way to tell the placement and size of the plot window
like e.g. there is in VPython? 

Cheers; 

Emil


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Double y-axis with the same 0

2010-07-21 Thread Thøger Emil Juul Thorsen
That really depends on what you want to do. For one single graph with
these specific values, it is quick and easy and hence very satisfying
*if that is what you need*. No need to go across the river for water.

But,  Daniele came up with a different and more sturdy solution (that I
have used in scripts of my own too), which is to specify the axes as
max-of-the-data-plus-a-bit reflected about a centered zero axis.
This is not data specific, more reusable, but also takes longer to
write. 

On Tue, 2010-07-20 at 15:28 -0500, Benjamin Root wrote:
> Somehow, this doesn't seem very satisfying.  It is almost accidental.
> There has to be a better way to do this.
> 
> Ben Root
> 
> 2010/7/20 Thøger Emil Juul Thorsen 
> One way is to specify the axes manually, e.g. setting:
> 
> (with matyplotlib.pyplot importad as plt:)
> 
> plt.axis([200, 500, -600, 600])
> 
> ...or whatever seems fitting for you, and do that on both of
> the y axes.
> That should align them nicely.
> 
> 
> On Sat, 2010-07-17 at 20:37 +0200, Daniele Padula wrote:
> > Hi everybody,
> > I have a problem with a plot. I attach a figure to be easily
> understandable.
> >
> > As you can see from the figure, I have in the same area a
> line and a bar
> > plot. The problem is that y=0 for right y axis is different
> with respect
> > to left y axis one. I want the two y=0 to be the same.
> >
> > How can i do that?
> >
> > Excuse me for my bad english, I'm italian :)
> >
> > Thanks in advance.
> 
> >
> 
> --
> > This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > Visit sprint.com/first --
> http://p.sf.net/sfu/sprint-com-first
> > ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> 
> 
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Double y-axis with the same 0

2010-07-20 Thread Thøger Emil Juul Thorsen
One way is to specify the axes manually, e.g. setting:

(with matyplotlib.pyplot importad as plt:)

plt.axis([200, 500, -600, 600])

...or whatever seems fitting for you, and do that on both of the y axes.
That should align them nicely.

On Sat, 2010-07-17 at 20:37 +0200, Daniele Padula wrote:
> Hi everybody,
> I have a problem with a plot. I attach a figure to be easily understandable.
> 
> As you can see from the figure, I have in the same area a line and a bar 
> plot. The problem is that y=0 for right y axis is different with respect 
> to left y axis one. I want the two y=0 to be the same.
> 
> How can i do that?
> 
> Excuse me for my bad english, I'm italian :)
> 
> Thanks in advance.
> --
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> ___ Matplotlib-users mailing list 
> Matplotlib-users@lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ginput(0) termination error

2010-06-08 Thread Thøger Emil Juul Thorsen
Thanks guys for your advice.

My mail server has been weird since yesterday so I only just saw your
messages now. In the meantime, I managed to hack and extend the
LineBuilder class code snippet at http://goo.gl/RLGS to actually meet my
needs better than ginput - but, obviously, much less portable  and
elegant; I have only been working with Python for a couple of weeks.



On Mon, 2010-06-07 at 09:29 -0400, Jae-Joon Lee wrote:
> I think this is a known bug (unfortunately, the bug fix does not seem
> to be reflected in the maintenance version), but without a full
> traceback, I'm not 100% sure.
> 
> You may use the svn version which have fixed this bug, or you may try
> the workaround described in the link below (check the
> clabel_monkeypatching.py).
> 
> http://sourceforge.net/tracker/index.php?func=detail&aid=2922835&group_id=80706&atid=560720
> 
> -JJ
> 
> 
> 
> 2010/6/4 Thøger Emil Juul Thorsen :
> > Hello list;
> >
> > I'm new to python/matplotlib, migrating from IDL. I need to do some
> > interactive point selection with mouse, and the pyplot.ginput() routine
> > seemed to be just the right thing here. I do however need to be able to
> > make a not previously specified number of clicks, so ginput(n=0) is a
> > requirement.
> >
> > However, when I press enter on my laptop (with no middle mouse button),
> > I get the error message:
> >
> > TypeError: stop_event_loop() takes exactly 1 argument (2 given)
> >
> > I've tried two different pieces of example code from the matplotlib SF
> > page.
> > I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
> > Is there any solution or workaround? If I cannot have this
> > functionality, it is, unfortunately, kind of a deal breaker for at least
> > some of my work, and I'd like to keep it purely Python.
> >
> > Best regards;
> >
> > Emil
> >
> >
> > --
> > ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
> > lucky parental unit.  See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >



--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] ginput(0) termination error

2010-06-07 Thread Thøger Emil Juul Thorsen
Bump - no one knows a solution/workaround to this?


> Hello list; 
> 
> I'm new to python/matplotlib, migrating from IDL. I need to do some
> interactive point selection with mouse, and the pyplot.ginput() routine
> seemed to be just the right thing here. I do however need to be able to
> make a not previously specified number of clicks, so ginput(n=0) is a
> requirement. 
> 
> However, when I press enter on my laptop (with no middle mouse button),
> I get the error message:
> 
> TypeError: stop_event_loop() takes exactly 1 argument (2 given)
> 
> I've tried two different pieces of example code from the matplotlib SF
> page.
> I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
> Is there any solution or workaround? If I cannot have this
> functionality, it is, unfortunately, kind of a deal breaker for at least
> some of my work, and I'd like to keep it purely Python.
> 
> Best regards; 
> 
> Emil
> 
> 
> --
> ThinkGeek and WIRED's GeekDad team up for the Ultimate 
> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
> lucky parental unit.  See the prize list and enter to win: 
> http://p.sf.net/sfu/thinkgeek-promo
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] ginput(0) termination error

2010-06-04 Thread Thøger Emil Juul Thorsen
Hello list; 

I'm new to python/matplotlib, migrating from IDL. I need to do some
interactive point selection with mouse, and the pyplot.ginput() routine
seemed to be just the right thing here. I do however need to be able to
make a not previously specified number of clicks, so ginput(n=0) is a
requirement. 

However, when I press enter on my laptop (with no middle mouse button),
I get the error message:

TypeError: stop_event_loop() takes exactly 1 argument (2 given)

I've tried two different pieces of example code from the matplotlib SF
page.
I'm using Matplotlib 0.99.1 on Ubuntu 10.04.
Is there any solution or workaround? If I cannot have this
functionality, it is, unfortunately, kind of a deal breaker for at least
some of my work, and I'd like to keep it purely Python.

Best regards; 

Emil


--
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users