From: Paweł R. <go...@gm...> - 2010-01-14 10:24:41
|
hello, I'm a quite new user of matplotlib - currently I'm working with scikits.timeseries and ran into a problem with rendering plots. I can draw scatter plots with dots ('.'), but when using lines ('-', '--', or similar) the graph breaks when missing data occurs. The best way to describe the problem would be an example: I'm trying to render the first example from the page: http://pytseries.sourceforge.net/lib.plotting.examples.html and what I get looks like the plotting was somehow 'stopped' after the first occurence of a hole in the data: http://img191.imageshack.us/img191/5506/testg.png After changing the marks to dots ('.') it renders like this (correctly): http://img97.imageshack.us/img97/269/imageap.png I have searched a bit and found a bug with path.simplify, but setting it to False doesn't change this behaviour. I'm using matplotlib-0.99.1.1 from the Gentoo packages. What can be the reason? greetings, Paweł Rumian |
From: Paweł R. <go...@gm...> - 2010-01-14 14:04:44
|
OK, I've done more tests. The problem occurs always when plotting data from masked array with lines. When there is a masked field in the array, drawing is stopped, and so if the first element is masked, no output can be seen. When all fields are unmasked, there is no problem. Also, drawing with dots works correctly. Can anybody check if this is a bug or a problem with my setup? greetings, Paweł Rumian |
From: Michael D. <md...@st...> - 2010-01-14 14:16:14
|
Does this example work for you? http://matplotlib.sourceforge.net/examples/pylab_examples/masked_demo.html I don't have scikits.timeseries installed, so I can't confirm whether your original attached example works or not. Can you produce a standalone example that reproduces the problem? Mike Paweł Rumian wrote: > OK, I've done more tests. > > The problem occurs always when plotting data from masked array with lines. > > When there is a masked field in the array, drawing is stopped, and so > if the first element is masked, no output can be seen. > > When all fields are unmasked, there is no problem. > Also, drawing with dots works correctly. > > Can anybody check if this is a bug or a problem with my setup? > > greetings, > Paweł Rumian > > ------------------------------------------------------------------------------ > Throughout its 18-year history, RSA Conference consistently attracts the > world's best and brightest in the field, creating opportunities for Conference > attendees to learn about information security's most important issues through > interactions with peers, luminaries and emerging and established companies. > http://p.sf.net/sfu/rsaconf-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Michael D. <md...@st...> - 2010-01-14 18:57:40
|
I'm not sure what the cause may be, particularly since I can't reproduce it myself with matplotlib 0.99.1.1. What backend are you using? Agg, Cairo and Wx all check out for me. The examples you point to don't look like Agg output to me... Do you have anything in your matplotlibrc? Mike Paweł Rumian wrote: > 2010/1/14 Michael Droettboom <md...@st...>: > >> Does this example work for you? >> >> http://matplotlib.sourceforge.net/examples/pylab_examples/masked_demo.html >> > > No, it doesn't. The green line is not being drawn. > After changing the style from 'g' to 'go' (marks instead of line) it > works flawlessly. > > I asked the same question in the scikits mailing list, and was > redirected to a recent discussion: > http://old.nabble.com/Re%3A-Still-having-plotting-issue-with-latest%09svnscikits.timeseries-ts20941722.html#a20944512 > > At first I was sure that it is also my case, but after trying the > example you've mentioned I'm almost certain that it's not so simple. > > So I'm still looking for a possible solution... > > greetings, > Paweł > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Paweł R. <go...@gm...> - 2010-01-15 08:16:04
|
2010/1/14 Michael Droettboom <md...@st...>: > What backend are you using? Agg, Cairo and Wx all check out for me. The > examples you point to don't look like Agg output to me... The examples were produced using savefig and PNG, but I've tried GTK and Qt with Agg and Cairo - neither of them works. > Do you have anything in your matplotlibrc? Nothing but the backend... I've just noticed that the green line shows sometimes when moving the plot. Quick examples: no move: http://img524.imageshack.us/img524/5696/61571712.png slightly right (no change): http://img94.imageshack.us/img94/6722/44916983.png more (green line appears): http://img27.imageshack.us/img27/522/91772530.png even more (disappears behind the edge): http://img246.imageshack.us/img246/9726/24229795.png to the right (another part suddenly appears): http://img190.imageshack.us/img190/5697/69412483.png still no idea... |
From: Andrew S. <str...@as...> - 2010-01-15 16:44:07
|
Paweł Rumian wrote: > 2010/1/14 Michael Droettboom <md...@st...>: > >> What backend are you using? Agg, Cairo and Wx all check out for me. The >> examples you point to don't look like Agg output to me... >> > > The examples were produced using savefig and PNG, but I've tried GTK > and Qt with Agg and Cairo - neither of them works. > > >> Do you have anything in your matplotlibrc? >> > > Nothing but the backend... > > I've just noticed that the green line shows sometimes when moving the plot. > Quick examples: > no move: http://img524.imageshack.us/img524/5696/61571712.png > slightly right (no change): http://img94.imageshack.us/img94/6722/44916983.png > more (green line appears): http://img27.imageshack.us/img27/522/91772530.png > even more (disappears behind the edge): > http://img246.imageshack.us/img246/9726/24229795.png > to the right (another part suddenly appears): > http://img190.imageshack.us/img190/5697/69412483.png > > still no idea... > Hi Paweł, to repeat a point that may have been lost in Michael's first email, some code that produces the problem will be greatly useful in tracking down what's going on. -Andrew |
From: Michael D. <md...@st...> - 2010-01-15 16:52:26
|
Andrew Straw wrote: > Paweł Rumian wrote: > >> 2010/1/14 Michael Droettboom <md...@st...>: >> >> >>> What backend are you using? Agg, Cairo and Wx all check out for me. The >>> examples you point to don't look like Agg output to me... >>> >>> >> The examples were produced using savefig and PNG, but I've tried GTK >> and Qt with Agg and Cairo - neither of them works. >> >> >> >>> Do you have anything in your matplotlibrc? >>> >>> >> Nothing but the backend... >> >> I've just noticed that the green line shows sometimes when moving the plot. >> Quick examples: >> no move: http://img524.imageshack.us/img524/5696/61571712.png >> slightly right (no change): http://img94.imageshack.us/img94/6722/44916983.png >> more (green line appears): http://img27.imageshack.us/img27/522/91772530.png >> even more (disappears behind the edge): >> http://img246.imageshack.us/img246/9726/24229795.png >> to the right (another part suddenly appears): >> http://img190.imageshack.us/img190/5697/69412483.png >> >> still no idea... >> >> > Hi Paweł, to repeat a point that may have been lost in Michael's first > email, some code that produces the problem will be greatly useful in > tracking down what's going on. > If I gather correctly, the masked_demo.py example in the matplotlib source is sufficient to reproduce the bug. Unfortunately, I can't reproduce it here with 0.99.1.1 or SVN HEAD, so there's some environmental difference about Pawel's system -- of course I'm at a loss as to what it might be. Are you sure you're running 0.99.1.1? Earlier versions have exhibited this class of bug, but I thought they were all squashed by now. What does the following give for you? > python Python 2.5.2 (r252:60911, May 7 2008, 12:40:32) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> matplotlib.__version__ '0.99.1.1' Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Paweł R. <go...@gm...> - 2010-01-15 17:08:14
|
2010/1/15 Michael Droettboom <md...@st...>: >> Hi Paweł, to repeat a point that may have been lost in Michael's first >> email, some code that produces the problem will be greatly useful in >> tracking down what's going on. > If I gather correctly, the masked_demo.py example in the matplotlib source > is sufficient to reproduce the bug. Yes, exactly. > Unfortunately, I can't reproduce it > here with 0.99.1.1 or SVN HEAD, so there's some environmental difference > about Pawel's system -- of course I'm at a loss as to what it might be. I suppose it may be somehow Gentoo-related problem - unfortunately I only have Gentoo boxes here, so I cannot check another OS, but the same problem occurs on a second machine. Furthermore I asked a friend with a Gentoo system and he confirmed this behaviour, so in the meantime I filed a Gentoo bug: http://bugs.gentoo.org/show_bug.cgi?id=301062 Maybe anyone here is also using Gentoo and can check it? > Are you sure you're running 0.99.1.1? Yes, 0.99.1.1 with Python 2.6.4 ~ $ python Python 2.6.4 (r264:75706, Dec 9 2009, 12:06:21) [GCC 4.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> matplotlib.__version__ '0.99.1.1' greetings, Paweł |
From: Michael D. <md...@st...> - 2010-01-15 17:35:20
|
Can you try building matplotlib 0.99.1.1 from the tarball, rather than the gentoo package? That would help to rule out any of the gentoo-specific changes. Nothing in the portage leaps out at me as problematic, but we should rule that out. Mike Paweł Rumian wrote: > 2010/1/15 Michael Droettboom <md...@st...>: > >>> Hi Paweł, to repeat a point that may have been lost in Michael's first >>> email, some code that produces the problem will be greatly useful in >>> tracking down what's going on. >>> >> If I gather correctly, the masked_demo.py example in the matplotlib source >> is sufficient to reproduce the bug. >> > > Yes, exactly. > > >> Unfortunately, I can't reproduce it >> here with 0.99.1.1 or SVN HEAD, so there's some environmental difference >> about Pawel's system -- of course I'm at a loss as to what it might be. >> > > I suppose it may be somehow Gentoo-related problem - unfortunately I > only have Gentoo boxes here, so I cannot check another OS, but the > same problem occurs on a second machine. > Furthermore I asked a friend with a Gentoo system and he confirmed > this behaviour, so in the meantime I filed a Gentoo bug: > http://bugs.gentoo.org/show_bug.cgi?id=301062 > > Maybe anyone here is also using Gentoo and can check it? > > >> Are you sure you're running 0.99.1.1? >> > > Yes, 0.99.1.1 with Python 2.6.4 > > ~ $ python > Python 2.6.4 (r264:75706, Dec 9 2009, 12:06:21) > [GCC 4.3.4] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>>> import matplotlib >>>> matplotlib.__version__ >>>> > '0.99.1.1' > > greetings, > Paweł > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |
From: Andrew S. <str...@as...> - 2010-01-15 17:58:29
|
I just tested 0.99.1.2 (no 0.99.1.1 tarball seems available on SF) and svn trunk and found no trouble with either on Ubuntu Karmic amd64. -Andrew |
From: Paweł R. <go...@gm...> - 2010-01-15 18:19:14
|
2010/1/15 Michael Droettboom <md...@st...>: > Can you try building matplotlib 0.99.1.1 from the tarball, rather than the > gentoo package? That would help to rule out any of the gentoo-specific > changes. Nothing in the portage leaps out at me as problematic, but we > should rule that out. I was trying to avoid this, because I didn't want to mess up with my python install, and using system and non-system packages simultaneously... But I've just finished building from the tarball available at SF and now it works flawlessly. So it is certainly a Gentoo bug. Thanks! Paweł |
From: Ryan M. <rm...@gm...> - 2010-01-15 19:47:19
|
On Fri, Jan 15, 2010 at 12:19 PM, Paweł Rumian <go...@gm...> wrote: > 2010/1/15 Michael Droettboom <md...@st...>: >> Can you try building matplotlib 0.99.1.1 from the tarball, rather than the >> gentoo package? That would help to rule out any of the gentoo-specific >> changes. Nothing in the portage leaps out at me as problematic, but we >> should rule that out. > > I was trying to avoid this, because I didn't want to mess up with my > python install, and using system and non-system packages > simultaneously... > > But I've just finished building from the tarball available at SF and > now it works flawlessly. So it is certainly a Gentoo bug. I can't replicate here on either of my AMD64 Gentoo system (with Gentoo's 0.99.1.1 matplotlib package). I should note that one is up to date with Portage (synced Monday) and the other is about 6 weeks out of date. With both, I see all 3 lines, correctly masked, unless I'm supposed to be looking for something else....? While it might be a Gentoo bug, I don't think it's necessarily in the matplotlib package, but rather in the underlying dependencies. Anybody have any clue what to look at from here? Have you tried blowing away the Gentoo install of matplotlib completely and trying a new one? Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from Norman, Oklahoma, United States |