subplot problems using comma notation

I've been having problems using the subplot command's comma notation for
describing how many plots to use (e.g. subplot(2,1,1) instead of
subplot(211)). Using the comma notation, all plots are overlaid in the
first position and remaining positions are blank but sized correctly as if
there should be a plots there. Here's an example demonstrating
this problem. This code is a minimally modified version of that given in
the online tutorial.

···

##################################################

from pylab import *

def f(t):
    s1 = cos(2*pi*t)
    e1 = exp(-t)
    return multiply(s1,e1)

t1 = arange(0.0, 5.0, 0.1)
t2 = arange(0.0, 5.0, 0.02)

figure(1)
subplot(2,1,1)
plot(t1, f(t1), 'bo', t2, f(t2), 'k')

subplot(2,1,2)
plot(t2, cos(2*pi*t2), 'r--')
show()

##################################################

I will probably end up using the axes command, but it would be nice to
know how to resolve this issue with subplot. I'm using Python 2.4 on
Ubuntu 6.06

Thanks,
Josh

Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7)
Josh, what version of matplotlib are you using ?

···

On Thursday 16 November 2006 23:45, Josh Lifton wrote:

I've been having problems using the subplot command's comma notation

Thanks for confirming that it works on another system. As I'm currently
using 0.82.5, I suspect upgrading to 0.87.5 (apparently the latest
available through official Ubuntu repositories in the newest distribution)
will solve the problem. I'll report back once I do this. Any Ubuntu
users out there have a similar experience?

Cheers,
Josh

···

On Fri, 17 Nov 2006, Pierre GM wrote:

On Thursday 16 November 2006 23:45, Josh Lifton wrote:
> I've been having problems using the subplot command's comma notation

Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7)
Josh, what version of matplotlib are you using ?

I have the same symptoms on my Ubuntu 6.06 using python 2.4 and
matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not
in the repositories as far as I can tell. I use synaptic for upgrading.

Josh Lifton schreef:

···

Thanks for confirming that it works on another system. As I'm currently
using 0.82.5, I suspect upgrading to 0.87.5 (apparently the latest
available through official Ubuntu repositories in the newest distribution)
will solve the problem. I'll report back once I do this. Any Ubuntu
users out there have a similar experience?

Cheers,
Josh

On Fri, 17 Nov 2006, Pierre GM wrote:

On Thursday 16 November 2006 23:45, Josh Lifton wrote:
    

I've been having problems using the subplot command's comma notation
      

Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7)
Josh, what version of matplotlib are you using ?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Unfortunately, 0.87-5 is only available in the 6.10 (Edgy) repositories,
so we'll have to upgrade to 6.10, request that matplotlib be backported to
6.06, or find a non-Ubuntu repository from which to install the latest
matplotlib package. I plan on upgrading sometime soon, so I'll wait for
that.

Cheers,
Josh

···

On Fri, 17 Nov 2006, Marius 't Hart wrote:

I have the same symptoms on my Ubuntu 6.06 using python 2.4 and
matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not
in the repositories as far as I can tell. I use synaptic for upgrading.

Josh Lifton schreef:
> Thanks for confirming that it works on another system. As I'm currently
> using 0.82.5, I suspect upgrading to 0.87.5 (apparently the latest
> available through official Ubuntu repositories in the newest distribution)
> will solve the problem. I'll report back once I do this. Any Ubuntu
> users out there have a similar experience?
>
> Cheers,
> Josh
>
> On Fri, 17 Nov 2006, Pierre GM wrote:
>
>
>> On Thursday 16 November 2006 23:45, Josh Lifton wrote:
>>
>>> I've been having problems using the subplot command's comma notation
>>>
>> Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7)
>> Josh, what version of matplotlib are you using ?
>>
>>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Using the advice from Seweryn Kokot I was able to install matplotlib
0.87.7-0, but this resulted in all sorts of errors instead of a graph.
I'll just make do with matplotlib 0.82-5 for now.
Thanks for your advice!
Marius.

Josh Lifton schreef:

···

Unfortunately, 0.87-5 is only available in the 6.10 (Edgy) repositories,
so we'll have to upgrade to 6.10, request that matplotlib be backported to
6.06, or find a non-Ubuntu repository from which to install the latest
matplotlib package. I plan on upgrading sometime soon, so I'll wait for
that.

Cheers,
Josh

On Fri, 17 Nov 2006, Marius 't Hart wrote:

I have the same symptoms on my Ubuntu 6.06 using python 2.4 and
matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not
in the repositories as far as I can tell. I use synaptic for upgrading.

Josh Lifton schreef:
    

Thanks for confirming that it works on another system. As I'm currently
using 0.82.5, I suspect upgrading to 0.87.5 (apparently the latest
available through official Ubuntu repositories in the newest distribution)
will solve the problem. I'll report back once I do this. Any Ubuntu
users out there have a similar experience?

Cheers,
Josh

On Fri, 17 Nov 2006, Pierre GM wrote:

On Thursday 16 November 2006 23:45, Josh Lifton wrote:

I've been having problems using the subplot command's comma notation

Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7)
Josh, what version of matplotlib are you using ?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

I would encourage anyone running linux to simply build matplotlib from the latest release tarball. It's easy. You may need to install some devel packages first, but once you have stumbled over the missing bits and installed them, then forever after you can very easily update to the latest version whenever there is a release. Matplotlib changes fast enough that this can be quite a help.

Eric

Josh Lifton wrote:

···

Unfortunately, 0.87-5 is only available in the 6.10 (Edgy) repositories,
so we'll have to upgrade to 6.10, request that matplotlib be backported to
6.06, or find a non-Ubuntu repository from which to install the latest
matplotlib package. I plan on upgrading sometime soon, so I'll wait for
that.

Cheers,
Josh

On Fri, 17 Nov 2006, Marius 't Hart wrote:

I have the same symptoms on my Ubuntu 6.06 using python 2.4 and
matplotlib 0.82-5. Where did you find matplotlib 0.87-5 though? It's not
in the repositories as far as I can tell. I use synaptic for upgrading.

Josh Lifton schreef:

Thanks for confirming that it works on another system. As I'm currently
using 0.82.5, I suspect upgrading to 0.87.5 (apparently the latest
available through official Ubuntu repositories in the newest distribution)
will solve the problem. I'll report back once I do this. Any Ubuntu
users out there have a similar experience?

Cheers,
Josh

On Fri, 17 Nov 2006, Pierre GM wrote:

On Thursday 16 November 2006 23:45, Josh Lifton wrote:

I've been having problems using the subplot command's comma notation

Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7)
Josh, what version of matplotlib are you using ?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Marius 't Hart wrote:

Using the advice from Seweryn Kokot I was able to install matplotlib
0.87.7-0, but this resulted in all sorts of errors instead of a graph.
I'll just make do with matplotlib 0.82-5 for now.
Thanks for your advice!
Marius.

That is probably because you installed a matplotlib compiled against newer libraries (e.g. numpy and/or Numeric and/or numarray) than you have installed on your machine (although I think package dependencies *should have* prevented this). If you build matplotlib from the tarball this will not occur--it will be compiled against the libraries that are on your machine. As I said before, you will only need to install some devel packages from your present distribution so that you will have the corresponding headers.

Eric

The subplot comma notation problem I was having seems to have gone away in
the latest Ubuntu distribution, which includes MPL 0.87-5.

Thanks,
Josh