You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
|
1
(2) |
2
(32) |
3
(26) |
4
(29) |
5
(41) |
6
(2) |
7
(1) |
8
(13) |
9
(15) |
10
(23) |
11
(23) |
12
(16) |
13
(6) |
14
(15) |
15
(4) |
16
(18) |
17
(28) |
18
(17) |
19
(11) |
20
(6) |
21
(2) |
22
(4) |
23
(1) |
24
|
25
|
26
(1) |
27
(2) |
28
(2) |
29
(3) |
30
(10) |
31
(2) |
|
|
|
Ben, Thanks for your reply. :-) This first link you mentioned seems to be a workaround. However, I am wondering if there is a way to set the position before the figure window is realized. Besides, the solution in the first link uses pyplot.get_current_fig_manager(). However, I don't see a counterpart of the figure manager in the matplotlib classes. From a developer perspective, it would be great if you can control the figure position during the initialization of the figure window, i.e., before there is any current figure window. However, I don't know if this is too much for now for matplotlib development. Cheers, Jianbao On Wed, Oct 3, 2012 at 6:57 AM, Benjamin Root <ben...@ou...> wrote: > > On Tue, Oct 2, 2012 at 11:38 PM, Jianbao Tao <jia...@gm...>wrote: > >> Hi, >> >> Is it possible to specify the position of a figure window when one is >> created? This will be a killing feature if one wants to put the figure >> window at the right place in the screen automatically. It is annoying if >> ones has to drag a new figure to a comfortable place in the screen every >> time a new figure is created. >> >> Jianbao >> >> > Jianbao, > > This question has come up before, and I have never really felt that a good > solution was ever given. However, here are some discussions and some > solutions for it. > > > http://stackoverflow.com/questions/7449585/how-do-you-set-the-absolute-position-of-figure-windows-with-matplotlib > > http://www.mail-archive.com/mat...@li.../msg14387.html > > http://stackoverflow.com/questions/11336835/ask-window-manager-to-place-matplotlib-plot-windows-always-on-top > > I know there are more discussions than this, mostly related to controlling > your window manager, but I can't seem to find them right now. > > Cheers! > Ben Root > >
On Wed, Oct 3, 2012 at 1:02 PM, Phil Elson <pel...@gm...> wrote: > I don't get this on matplotlib/master (and therefore probably not on > 1.2rc2). > > I'm pretty sure masked array line plotting was fixed at some point this > release cycle (I cannot find the appropriate github issue to link to), so I > suggest this is a known bug with 1.1.1 and fixed in 1.2. Just to be clear, > I am using the TkAgg backend, and there is a remote possiblity that this > bug is backend dependent. Is there any chance you could test this with the > latest release candidate? > > Many Thanks, > > This issue may be dependent upon which version of Numpy one is using. As Eric pointed out, one should be getting an object array if you have a None in the list. On top of that, I wouldn't be surprised if the different backends handled this object array differently. As far as I am concerned, using None in the list is the bug and is not only unsupported, but should be actively discouraged. Use NaNs or masked arrays instead. (and to ward off the inevitable question, I would advise against explicitly checking for object arrays because there are times when it is correct to have such arrays, i.e., python decimal or datetime objects). Cheers! Ben Root
I don't get this on matplotlib/master (and therefore probably not on 1.2rc2). I'm pretty sure masked array line plotting was fixed at some point this release cycle (I cannot find the appropriate github issue to link to), so I suggest this is a known bug with 1.1.1 and fixed in 1.2. Just to be clear, I am using the TkAgg backend, and there is a remote possiblity that this bug is backend dependent. Is there any chance you could test this with the latest release candidate? Many Thanks, On 3 October 2012 17:47, Charleux Ludovic <lud...@gm...>wrote: > Hello Phil, > > Your example does not trigger the bug because you don't zoom or specifiy > xlim/ylim so that some points are (far) out of the current axis. For > example, if you just add these lines to your code, you'll have it: > > > import matplotlib.pyplot as plt > import numpy as np > x = np.array([0, 1, None, 1, 0]) > y = np.array([0, 1, None, 0, 1]) > plt.plot(x, y) > # Add this or zoom in the upper left corner. > plt.xlim([0., 0.2]) > plt.ylim([.9, 1.1]) > plt.show() > > Here I see an horizontal line where I should see a 45° tilted line. And > the nasty part of this bug is that it only affects lines declared with at > least one None in them where continuous lines seem unaffected as shown here: > > > import matplotlib.pyplot as plt > import numpy as np > x0 = np.array([0, 1]) > y0 = np.array([0, 1]) > x1 = np.array([1, 0]) > y1 = np.array([0, 1]) > plt.plot(x0, y0) > plt.plot(x1, y1) > # Add this > plt.xlim([0., 0.2]) > plt.ylim([.9, 1.1]) > plt.show() > > I get a 45° line. > > Ludovic > > ps: I use matplotlib 1.1.1rc (stock version available on repositories) on > Xubuntu 12.04 (precise) 64-bit > > > 2012年10月3日 Phil Elson <pel...@gm...> > >> This works for me with 1.2 (not tested before that): >> >> >> import matplotlib.pyplot as plt >> import numpy as np >> >> >> x = np.array([0, 1, None, 1, 0]) >> y = np.array([0, 1, None, 0, 1]) >> >> plt.plot(x, y) >> >> plt.show() >> >> >> >> I get two distinct lines crossing each other at (0.5, 0.5) >> >> >> HTH, >> > > > > -- > > *Ludovic Charleux* > Assistant Professor > > *SYMME / Polytech' Annecy Chambery * > <http://www.polytech.univ-savoie.fr/index.php?id=symme_accueil&L=1> Domaine > Universitaire, BP 80439 > <http://maps.google.com/maps?q=Domaine+Universitaire%2C+BP+80439%2C+Annecy+le+vieux+cedex%2C+F74944%2C+France&hl=en>Annecy le vieux cedex, F74944 France > *Work:* 33 (0) 4 50 09 65 62 > *Fax:* 33 (0) 4 50 09 65 43 > *Email:* lud...@un... > *Professional Profile<http://fr.linkedin.com/pub/ludovic-charleux/22/611/997> > * > See who we know in common<http://www.linkedin.com/e/wwk/79152451/?hs=false&tok=1JhCnH2Q-kS5g1> Want > a signature like this?<http://www.linkedin.com/e/sig/79152451/?hs=false&tok=3gCpNtR8KkS5g1> >
Jianbao, The one thing I would add to Anthony's response, which is a good summary of what I would say, is that you should look into the animation aspects of matplotlib, and the xdata and ydata attributes of lines/axes for speed in replotting mostly similar situations. I regret having not learned of these before I made an application, and I have yet to go back and implement these faster methods. -Sterling On Oct 3, 2012, at 9:49AM, Anthony Floyd wrote: > Hi Jianbao, > > First some context: at the company I work for, we've been using > matplotlib to do much of what you want to do for the past 4 years. We > have created our own application for plotting, interrogating, and > manipulating time-series data coming from both simulations and > measurements, although from a completely different domain (in our case > it's virtual manufacturing of composite materials). In the past two > years, we've also been using matplotlib to plot in more-or-less > realtime data from a cloud industrial sensors (temperature, pressure, > etc). > >> After reading the matplotlib documents and trying out several little >> examples for a few days, I now have a feeling that matplotlib at least has >> most of the infrastructure ready for my purposes. One thing that bothers me >> a little bit is that the plotting speed seems to be a little slow. But IDL >> had the same problem in the first place too. As computers became faster and >> faster, that problem just became less and less important. I expect the same >> thing will happen to matplotlib too. > > This is true, matplotlib can be slow, particularly for large data sets > and many data sets. The trick is to downsample (and use tiling if > you're going to be panning around a lot) what you're actually plotting > before handing it off to the plot. I think more recent versions of > matplotlib handle some of this for you, but we've found that it's > faster to do the downsampling ourselves. > >> Now let me turn to technical stuff. What I want is a time-series plotting > [...] >> sufficient. Third, the system should have minimal dependencies for the sake >> of portability and installation easiness. As for now, I don't want any >> dependencies beyond numpy, scipy, and matplotlib. Ipython would be a highly >> recommended tool, but the system should be just fine without it. > > You're going to need more than that. At the very least you're going to > need a widget framework like wxPython, pyQT, pyGTK, or some such. > These will provide you with all the window management, widget > controls, and so on. Our preference is wxPython but YMMV. > >> After weighing all the options, I sense that I will probably be better off >> to use the matplotlib library directly, rather than the convenient utilities >> provided by pyplot. However, I am having a hard time to find good >> instructions for using the matplotlib infrastructure. So, I would like to >> hear some references on that. I also would like to hear general advice about >> how to construct such a system so that its structure is consistent with >> matplotlib conventions. Other comments and advice are warmly welcome too. > > Absolutely, you'll want to use the API rather than the utility > functions. The best reference for that is the online documentation at > matplotlib.org. In the past we've found the source code documentation > (or, say, that generated by doxygen) more helpful than the Sphinx > documentation, but frankly our matplotlib bits are pretty stable now > and we haven't had to use the documentation for a while (perhaps it's > better now). > > Good luck! We've been very happy with our design choices, and get > nothing but positive feedback on how our plots look and feel. > matplotlib and the amazing active community around it have everything > to do with that. > > Anthony. > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On 2012年10月03日 4:24 AM, Charleux Ludovic wrote: > Hello, > > I want to plot multiple lines using matplotlib.pyplot.plot using the > None separator: when i zoom or plot lines that go far away from the axis > limits, they their direction is changed. I encounter a bug shown by the > folowing code: > > import matplotlib.pyplot as plt > > # Single line > x = [0., 1., 1., 0., 0.] > y = [0., 0., 1., 1., 0.] > > # Multiple lines separated by None > x2 = [0., 1., None ,1., 0.] > y2 = [0., 0., None, 1., 1.] I'm surprised this works at all. I don't think we have ever intentionally supported object arrays, which is what you get when you take np.array() of a list with a None in it. If you want to use this method to make a set of line segments, use np.nan in place of None. Eric > > # Let's plot > fig = plt.figure(0) > plt.clf() > ax = fig.add_subplot(121) > plt.title('No zoom') > plt.xlim([-1, 2]) > plt.ylim([-1, 2]) > plt.plot(x,y, 'bo-', label = 'This is ok') > plt.plot(x2,y2, 'ro-', label = 'This is not ok') > plt.legend() > ax = fig.add_subplot(122) > plt.title('With zoom one a corner') > plt.xlim([-.05, .1]) > plt.ylim([.95, 1.05]) > plt.plot(x,y, 'bo-', label = 'This is ok') > plt.plot(x2,y2, 'ro-', label = 'This is not ok') > plt.legend() > plt.show() > > I tried several approaches to solve the problem but never succeeded. I > don't wich to use 2D arrays or LineCollections because this solution is > faster and allows the declaration of all lines with a single label and > color. Has anyone any idea ? > > Regards. > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi Jianbao, First some context: at the company I work for, we've been using matplotlib to do much of what you want to do for the past 4 years. We have created our own application for plotting, interrogating, and manipulating time-series data coming from both simulations and measurements, although from a completely different domain (in our case it's virtual manufacturing of composite materials). In the past two years, we've also been using matplotlib to plot in more-or-less realtime data from a cloud industrial sensors (temperature, pressure, etc). > After reading the matplotlib documents and trying out several little > examples for a few days, I now have a feeling that matplotlib at least has > most of the infrastructure ready for my purposes. One thing that bothers me > a little bit is that the plotting speed seems to be a little slow. But IDL > had the same problem in the first place too. As computers became faster and > faster, that problem just became less and less important. I expect the same > thing will happen to matplotlib too. This is true, matplotlib can be slow, particularly for large data sets and many data sets. The trick is to downsample (and use tiling if you're going to be panning around a lot) what you're actually plotting before handing it off to the plot. I think more recent versions of matplotlib handle some of this for you, but we've found that it's faster to do the downsampling ourselves. > Now let me turn to technical stuff. What I want is a time-series plotting [...] > sufficient. Third, the system should have minimal dependencies for the sake > of portability and installation easiness. As for now, I don't want any > dependencies beyond numpy, scipy, and matplotlib. Ipython would be a highly > recommended tool, but the system should be just fine without it. You're going to need more than that. At the very least you're going to need a widget framework like wxPython, pyQT, pyGTK, or some such. These will provide you with all the window management, widget controls, and so on. Our preference is wxPython but YMMV. > After weighing all the options, I sense that I will probably be better off > to use the matplotlib library directly, rather than the convenient utilities > provided by pyplot. However, I am having a hard time to find good > instructions for using the matplotlib infrastructure. So, I would like to > hear some references on that. I also would like to hear general advice about > how to construct such a system so that its structure is consistent with > matplotlib conventions. Other comments and advice are warmly welcome too. Absolutely, you'll want to use the API rather than the utility functions. The best reference for that is the online documentation at matplotlib.org. In the past we've found the source code documentation (or, say, that generated by doxygen) more helpful than the Sphinx documentation, but frankly our matplotlib bits are pretty stable now and we haven't had to use the documentation for a while (perhaps it's better now). Good luck! We've been very happy with our design choices, and get nothing but positive feedback on how our plots look and feel. matplotlib and the amazing active community around it have everything to do with that. Anthony.
Hello Phil, Your example does not trigger the bug because you don't zoom or specifiy xlim/ylim so that some points are (far) out of the current axis. For example, if you just add these lines to your code, you'll have it: import matplotlib.pyplot as plt import numpy as np x = np.array([0, 1, None, 1, 0]) y = np.array([0, 1, None, 0, 1]) plt.plot(x, y) # Add this or zoom in the upper left corner. plt.xlim([0., 0.2]) plt.ylim([.9, 1.1]) plt.show() Here I see an horizontal line where I should see a 45° tilted line. And the nasty part of this bug is that it only affects lines declared with at least one None in them where continuous lines seem unaffected as shown here: import matplotlib.pyplot as plt import numpy as np x0 = np.array([0, 1]) y0 = np.array([0, 1]) x1 = np.array([1, 0]) y1 = np.array([0, 1]) plt.plot(x0, y0) plt.plot(x1, y1) # Add this plt.xlim([0., 0.2]) plt.ylim([.9, 1.1]) plt.show() I get a 45° line. Ludovic ps: I use matplotlib 1.1.1rc (stock version available on repositories) on Xubuntu 12.04 (precise) 64-bit 2012年10月3日 Phil Elson <pel...@gm...> > This works for me with 1.2 (not tested before that): > > > import matplotlib.pyplot as plt > import numpy as np > > > x = np.array([0, 1, None, 1, 0]) > y = np.array([0, 1, None, 0, 1]) > > plt.plot(x, y) > > plt.show() > > > > I get two distinct lines crossing each other at (0.5, 0.5) > > > HTH, > -- *Ludovic Charleux* Assistant Professor *SYMME / Polytech' Annecy Chambery * <http://www.polytech.univ-savoie.fr/index.php?id=symme_accueil&L=1> Domaine Universitaire, BP 80439 <http://maps.google.com/maps?q=Domaine+Universitaire%2C+BP+80439%2C+Annecy+le+vieux+cedex%2C+F74944%2C+France&hl=en>Annecy le vieux cedex, F74944 France *Work:* 33 (0) 4 50 09 65 62 *Fax:* 33 (0) 4 50 09 65 43 *Email:* lud...@un... *Professional Profile<http://fr.linkedin.com/pub/ludovic-charleux/22/611/997> * See who we know in common<http://www.linkedin.com/e/wwk/79152451/?hs=false&tok=1JhCnH2Q-kS5g1> Want a signature like this?<http://www.linkedin.com/e/sig/79152451/?hs=false&tok=3gCpNtR8KkS5g1>
Dear all, As some of you might have noticed, I am asking questions frequently recently, most of which are naive ones. The reason for this is that I recently decided to develop a satellite data viewer with matplotlib, and I am new to both python and matplotlib. Here is a little background of this decision. I am a postdoc in the space physics field, where a lot of people watch and analyze satellite data for a living. The data are time-series data by nature. As for now, a lot of people use packages based on IDL to navigate their data. I myself is one of them too. For now. :-) One big problem with IDL is that it is very expensive because it doesn't have a broad enough user base to drive their cost down. Another big problem is that the company that is developing IDL doesn't seem to work in the right direction. For example, more than 99% of the time of more than 99% of the IDL users use the so-called direct graphics system in IDL, but IDL hasn't upgraded this system since, I don't know, maybe early 90s. Compared to what matplotlib can offer, the on-screen graphics quality of the IDL direct graphics is simply "ugly", which is a big reason why I want to switch to matplotlib. There are also some other frequently-used nice features in matplotlib that IDL doesn't have. After reading the matplotlib documents and trying out several little examples for a few days, I now have a feeling that matplotlib at least has most of the infrastructure ready for my purposes. One thing that bothers me a little bit is that the plotting speed seems to be a little slow. But IDL had the same problem in the first place too. As computers became faster and faster, that problem just became less and less important. I expect the same thing will happen to matplotlib too. Now let me turn to technical stuff. What I want is a time-series plotting system like the following. First, it manages all the figure windows it generates, including the positions and looks of the figure windows. A common use case for such a system would be that the user is also analyzing the data while watching the time-series data,and hence the user likely needs to plot some temporary results, such as a snapshot of particle distribution function, but doesn't want to screw up the time-series plot. Therefore, it will be nice that the plotting windows of the time-series data are managed particularly. Second, it should come with a navigation toolbar that facilitates the data navigation. The current navigation toolbar widget is nice and probably suit more than 50% percent of my needs, but it's not sufficient. Third, the system should have minimal dependencies for the sake of portability and installation easiness. As for now, I don't want any dependencies beyond numpy, scipy, and matplotlib. Ipython would be a highly recommended tool, but the system should be just fine without it. After weighing all the options, I sense that I will probably be better off to use the matplotlib library directly, rather than the convenient utilities provided by pyplot. However, I am having a hard time to find good instructions for using the matplotlib infrastructure. So, I would like to hear some references on that. I also would like to hear general advice about how to construct such a system so that its structure is consistent with matplotlib conventions. Other comments and advice are warmly welcome too. :-) Thank you very much for reading this far. Jianbao
This works for me with 1.2 (not tested before that): import matplotlib.pyplot as plt import numpy as np x = np.array([0, 1, None, 1, 0]) y = np.array([0, 1, None, 0, 1]) plt.plot(x, y) plt.show() I get two distinct lines crossing each other at (0.5, 0.5) HTH,
I've been thinking a lot lately about how CSS could be used to specify styles in matplotlib. It would allow one to specify any set of styles to cycle through (colors, linestyles, whatever other properties). axes.nth-child(0) { color: blue } axes.nth-child(1) { color: green } vs. axes.nth-child(0) { dashes: dotted } axes.nth-child(1) { dashed: dashed } The obstacles to integrating something like that are that a) matplotlib currently doesn't maintain the fact that a plot's style was "unset" at the time of creation, and b) the heirarchy of plot objects is a little tangled, so it would be hard to specify using CSS selectors what should be styled. It does keep popping up in my brain as a clean and complete solution to the problem of styling, but there would need to be a number of changes to the internal plumbing to make it work. Mike On 10/03/2012 08:48 AM, Benjamin Root wrote: > > > On Tue, Oct 2, 2012 at 11:37 AM, Tony Yu <ts...@gm... > <mailto:ts...@gm...>> wrote: > > > > On Tue, Oct 2, 2012 at 11:04 AM, Benjamin Root <ben...@ou... > <mailto:ben...@ou...>> wrote: > > > > On Tue, Oct 2, 2012 at 8:31 AM, William Furnass > <wi...@th... <mailto:wi...@th...>> wrote: > > Did anything ever come of the MPL black and white mode > mentioned in > the following? I rarely want to produce colour plots and > having an > inbuilt mechanism for cycling through line styles that can be > activated with a keyword argument would be very handy. > > http://www.mail-archive.com/mat...@li.../msg00367.html > > Cheers, > > Will > > > Perhap's Tony Yu's mpltools might be the closest we have > gotten to this goal. There has been a number of technical > hurdles that I have not had the time or resources to iron > out. Hopefully, it will be helpful to you. > > http://tonysyu.github.com/mpltools/getting_started.html > > Cheers! > Ben Root > > > Thanks for the advertisement Ben ;) > > Will: If you're just interested in grayscale plotting, here's a > direct link to the example: > > http://tonysyu.github.com/mpltools/auto_examples/style/plot_grayscale.html > > The discussion that you link to talks specifically about line > styles. In the past there's been discussion of adding a linestyle > cycle rc param, but I don't think there's been progress on that front. > > BTW, Ben: are you still thinking about some sort of hierarchical > configuration management? I think it'd make a great MEP, if you > find the time. > > > Not necessarily a hierarchical config management, but rather a > hierarchical property management. Of course, this was before I > discovered GraphicsContext, which makes me wonder if it could be > generalized and moved out of the backends to serve such a purpose. > > Of course, with regards to rcparams, we definitely need to re-examine > how we are doing it right now before it gets too bloated... > > Ben Root > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hello, I want to plot multiple lines using matplotlib.pyplot.plot using the None separator: when i zoom or plot lines that go far away from the axis limits, they their direction is changed. I encounter a bug shown by the folowing code: import matplotlib.pyplot as plt # Single line x = [0., 1., 1., 0., 0.] y = [0., 0., 1., 1., 0.] # Multiple lines separated by None x2 = [0., 1., None ,1., 0.] y2 = [0., 0., None, 1., 1.] # Let's plot fig = plt.figure(0) plt.clf() ax = fig.add_subplot(121) plt.title('No zoom') plt.xlim([-1, 2]) plt.ylim([-1, 2]) plt.plot(x,y, 'bo-', label = 'This is ok') plt.plot(x2,y2, 'ro-', label = 'This is not ok') plt.legend() ax = fig.add_subplot(122) plt.title('With zoom one a corner') plt.xlim([-.05, .1]) plt.ylim([.95, 1.05]) plt.plot(x,y, 'bo-', label = 'This is ok') plt.plot(x2,y2, 'ro-', label = 'This is not ok') plt.legend() plt.show() I tried several approaches to solve the problem but never succeeded. I don't wich to use 2D arrays or LineCollections because this solution is faster and allows the declaration of all lines with a single label and color. Has anyone any idea ? Regards.
On 02/10/12 11:37:50 -0400, Tony Yu wrote: > [...snip...] > > The discussion that you link to talks specifically about line styles. In > the past there's been discussion of adding a linestyle cycle rc param, but > I don't think there's been progress on that front. > > [...snip...] > Just wanted to pop in and say, that I'd like the linestyle cycle rc param as well. :) All the best, Ignas A.
Personally, I am not a fan of adding a window specific keyword to the figure function (although there may be some there already). With 1.2 you can use Matthew Emmett/Paul Ivanov's awesome new context manager to remove the toolbar for the duration of the with statement: import matplotlib.pyplot as plt import matplotlib as mpl with mpl.rc_context({'toolbar':False}): plt.plot(range(10)) plt.show() Does that make things easier/nicer for you? Cheers,
Hi, I am using Eclipse IDE for Java Developers with PyDev on Ubuntu 12.04 and I am quite new to Ubuntu and Eclipse. Can you guide me as to hos to update matplotlib in PyDev in Eclipse? -- Best Regards, Harshad Surdi
On Tue, Oct 2, 2012 at 11:09 PM, Jianbao Tao <jia...@gm...> wrote: > Hi, > > I know one can make a figure window without toolbar by doing > mpl.rcParams['toolbar'] = 'None' > > However, this approach is kind of annoying if one just wants to remove the > toolbar for one figure window and to keep the default behavior to be with a > toolbar. So, I am wondering if it is possible to do something like: > fig = figure(toolbar=False) # Create a new figure window with no toolbar. > > If it is not possible now, I am wondering if the matplotlib team has any > intention to implement that feature. I would think it is not hard to do so, > since it is so easy to achieve that goal by setting a parameter. But I > could very much be wrong, as I know nothing about how things work under the > hood for matplotlib. > > Anyway, I am mostly just curious, since I have already got a workaround > for that. But it would be nice to know other's people's approaches/ideas. > :-) > > Thank you very much. > Actually, such a feature shouldn't be too difficult to add. Why don't you make a feature request for it on github and you might see it added for v1.3. Cheers! Ben Root
On Tue, Oct 2, 2012 at 11:38 PM, Jianbao Tao <jia...@gm...> wrote: > Hi, > > Is it possible to specify the position of a figure window when one is > created? This will be a killing feature if one wants to put the figure > window at the right place in the screen automatically. It is annoying if > ones has to drag a new figure to a comfortable place in the screen every > time a new figure is created. > > Jianbao > > Jianbao, This question has come up before, and I have never really felt that a good solution was ever given. However, here are some discussions and some solutions for it. http://stackoverflow.com/questions/7449585/how-do-you-set-the-absolute-position-of-figure-windows-with-matplotlib http://www.mail-archive.com/mat...@li.../msg14387.html http://stackoverflow.com/questions/11336835/ask-window-manager-to-place-matplotlib-plot-windows-always-on-top I know there are more discussions than this, mostly related to controlling your window manager, but I can't seem to find them right now. Cheers! Ben Root
On Tue, Oct 2, 2012 at 11:37 AM, Tony Yu <ts...@gm...> wrote: > > > On Tue, Oct 2, 2012 at 11:04 AM, Benjamin Root <ben...@ou...> wrote: > >> >> >> On Tue, Oct 2, 2012 at 8:31 AM, William Furnass <wi...@th...>wrote: >> >>> Did anything ever come of the MPL black and white mode mentioned in >>> the following? I rarely want to produce colour plots and having an >>> inbuilt mechanism for cycling through line styles that can be >>> activated with a keyword argument would be very handy. >>> >>> >>> http://www.mail-archive.com/mat...@li.../msg00367.html >>> >>> Cheers, >>> >>> Will >>> >>> >> Perhap's Tony Yu's mpltools might be the closest we have gotten to this >> goal. There has been a number of technical hurdles that I have not had the >> time or resources to iron out. Hopefully, it will be helpful to you. >> >> http://tonysyu.github.com/mpltools/getting_started.html >> >> Cheers! >> Ben Root >> > > Thanks for the advertisement Ben ;) > > Will: If you're just interested in grayscale plotting, here's a direct > link to the example: > > > http://tonysyu.github.com/mpltools/auto_examples/style/plot_grayscale.html > > The discussion that you link to talks specifically about line styles. In > the past there's been discussion of adding a linestyle cycle rc param, but > I don't think there's been progress on that front. > > BTW, Ben: are you still thinking about some sort of hierarchical > configuration management? I think it'd make a great MEP, if you find the > time. > > Not necessarily a hierarchical config management, but rather a hierarchical property management. Of course, this was before I discovered GraphicsContext, which makes me wonder if it could be generalized and moved out of the backends to serve such a purpose. Of course, with regards to rcparams, we definitely need to re-examine how we are doing it right now before it gets too bloated... Ben Root
> Note, however, code has been improved for the 1.2.0 release to make it easier to modify the set of buttons that are used. In backend_bases.py, look for the NavigationToolbar2 class. Ah yes! I knew I did that for a good reason. :-) Good thinking Ben!
On 2012年10月02日 11:37:50 -0400, Tony Yu wrote: >> On Tue, Oct 2, 2012 at 8:31 AM, William Furnass >> <wi...@th...>wrote: >> >>> Did anything ever come of the MPL black and white mode mentioned in >>> the following? I rarely want to produce colour plots and having an >>> inbuilt mechanism for cycling through line styles that can be >>> activated with a keyword argument would be very handy. >>> >>> http://www.mail-archive.com/matplotlib-users-5NWGOfrQmneRv +LV...@pu.../msg00367.html > > Will: If you're just interested in grayscale plotting, here's a direct > link to the example: > > http://tonysyu.github.com/mpltools/auto_examples/style/ plot_grayscale.html > > The discussion that you link to talks specifically about line styles. In > the past there's been discussion of adding a linestyle cycle rc param, > but I don't think there's been progress on that front. Ben, Tony: thanks for the info. mpltools is new to me, very much like the idea of being able to enable stylesheets for specific plots. +1 for linestyle cycling. I've been impressed with Sigmaplot's default choices of line styles when producing B&W figures and would love it if such behaviour were easily accessible in MPL. Cheers, Will
Hi, Is it possible to specify the position of a figure window when one is created? This will be a killing feature if one wants to put the figure window at the right place in the screen automatically. It is annoying if ones has to drag a new figure to a comfortable place in the screen every time a new figure is created. Jianbao
Hi, I know one can make a figure window without toolbar by doing mpl.rcParams['toolbar'] = 'None' However, this approach is kind of annoying if one just wants to remove the toolbar for one figure window and to keep the default behavior to be with a toolbar. So, I am wondering if it is possible to do something like: fig = figure(toolbar=False) # Create a new figure window with no toolbar. If it is not possible now, I am wondering if the matplotlib team has any intention to implement that feature. I would think it is not hard to do so, since it is so easy to achieve that goal by setting a parameter. But I could very much be wrong, as I know nothing about how things work under the hood for matplotlib. Anyway, I am mostly just curious, since I have already got a workaround for that. But it would be nice to know other's people's approaches/ideas. :-) Thank you very much. Jianbao
On Tue, Oct 2, 2012 at 9:09 PM, Eric Firing <ef...@ha...> wrote: > On 2012年10月02日 9:21 AM, Michael Aye wrote: >>>>>>>> >>>>>>> How nice of you to ask! ;) >>>>>>> Indeed: I had the case that image arrays inside an ImageGrid where >>> shown with some white overhead area around, e.g. for an image of 100 >>> pixels on the x-axis, the imshow resulted in an x-axis that went from >>> -10 to 110. I was looking for a simple way to suppress that behavior >>> and let imshow instead use the exact image extent. I believe that the >>> plot command has such a flag, hasn't it? (I.e. to use the exact xdata >>> range and not try to beautify the plot? >>>>>>> >>>>>>> Michael >>>>>>> >>>>>> >>>>>> Is the 'extent' keyword what you're looking for? >>>>>> >>>>> >>>>> No, because it needs detail. I was looking for a boolean switch that >>> basically says: Respect the data, not beauty. >>>> >>>> I don't understand what you mean by 'beauty'. If your image is 100 >>>> pixels wide and 50 pixels tall, what is it about extent=[0,100,0,50] >>>> that doesn't do what you want? >>>> >>> As I wrote, that's not what is happening. I get extent=[-10,110,0,50]. >>> >>> >>> Which version of matplotlib are you using? Also, are you on a 32-bit >>> machine or a 64-bit machine. This might be related to a bug we have >>> seen recently. >> >> I am using mpl 1.1.0 from EPD 7.3-2 on a 64-bit Mac OSX. >> >> Thanks for the effort Damon. I should have been starting with an >> example script from the beginning. >> I believe the problem appears only for subplots in the case of sharex >> =sharey = True: > > Aha! This is a real bug. It may take a bit of work to track it down. > Would you enter it, with this test script, as a github issue, please? > > Thank you. > > Eric > >> >> from matplotlib.pyplot import show, subplots >> from numpy import arange, array >> >> arr = arange(10000).reshape(100,100) >> l = [arr,arr,arr,arr] >> narr = array(l) >> >> fig, axes = subplots(2,2,sharex=True,sharey=True) >> >> for ax,im in zip(axes.flatten(),narr): >> ax.imshow(im) >> >> show() >> >> One can see that all the 4 axes show the array with an extent of >> [-10,110, 0, 100] here. >> >> Michael >> >> >>> >>> Ben Root >>> >>> ------------------------------------------------------------------------------ >>> Don't let slow site performance ruin your business. Deploy New Relic APM >>> Deploy New Relic app performance management and know exactly >>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>> http://p.sf.net/sfu/newrelic-dev2dev >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users The extent keyword is something I put in as second nature. You'll need it if your x-range or y-range is something other than the the number of pixels in each dimension. In this case, it can safely be removed, yes. Thanks for pointing that out. If you want to share axes, that is still possible: import matplotlib.pyplot as plt from numpy import arange, array arr = arange(10000).reshape(100,100) l = [arr,arr,arr,arr] narr = array(l) axes = [] fig = plt.figure() for i in range(4): if i == 0: axes.append(fig.add_subplot(2, 2, i)) if i > 0: axes.append(fig.add_subplot(2, 2, i, sharex=axes[0], sharey=axes[0])) for ax, im in zip(axes, narr): ax.imshow(im, extent=[0,100,0,100]) plt.show() -- Damon McDougall http://www.damon-is-a-geek.com B2.39 Mathematics Institute University of Warwick Coventry West Midlands CV4 7AL United Kingdom
On 2012年10月02日 9:21 AM, Michael Aye wrote: >>>>>>> >>>>>> How nice of you to ask! ;) >>>>>> Indeed: I had the case that image arrays inside an ImageGrid where >> shown with some white overhead area around, e.g. for an image of 100 >> pixels on the x-axis, the imshow resulted in an x-axis that went from >> -10 to 110. I was looking for a simple way to suppress that behavior >> and let imshow instead use the exact image extent. I believe that the >> plot command has such a flag, hasn't it? (I.e. to use the exact xdata >> range and not try to beautify the plot? >>>>>> >>>>>> Michael >>>>>> >>>>> >>>>> Is the 'extent' keyword what you're looking for? >>>>> >>>> >>>> No, because it needs detail. I was looking for a boolean switch that >> basically says: Respect the data, not beauty. >>> >>> I don't understand what you mean by 'beauty'. If your image is 100 >>> pixels wide and 50 pixels tall, what is it about extent=[0,100,0,50] >>> that doesn't do what you want? >>> >> As I wrote, that's not what is happening. I get extent=[-10,110,0,50]. >> >> >> Which version of matplotlib are you using? Also, are you on a 32-bit >> machine or a 64-bit machine. This might be related to a bug we have >> seen recently. > > I am using mpl 1.1.0 from EPD 7.3-2 on a 64-bit Mac OSX. > > Thanks for the effort Damon. I should have been starting with an > example script from the beginning. > I believe the problem appears only for subplots in the case of sharex > =sharey = True: Aha! This is a real bug. It may take a bit of work to track it down. Would you enter it, with this test script, as a github issue, please? Thank you. Eric > > from matplotlib.pyplot import show, subplots > from numpy import arange, array > > arr = arange(10000).reshape(100,100) > l = [arr,arr,arr,arr] > narr = array(l) > > fig, axes = subplots(2,2,sharex=True,sharey=True) > > for ax,im in zip(axes.flatten(),narr): > ax.imshow(im) > > show() > > One can see that all the 4 axes show the array with an extent of > [-10,110, 0, 100] here. > > Michael > > >> >> Ben Root >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On 2012年10月02日 19:49:16 +0000, Damon McDougall said: > On Tue, Oct 2, 2012 at 8:33 PM, Michael Aye > <kmi...@gm...> wrote: >>>>>>>>>> >>>>>>>>> How nice of you to ask! ;) >>>>>>>>> Indeed: I had the case that image arrays inside an ImageGrid where >>>>>>>>> shown with some white overhead area around, e.g. for an image of 100 >>>>>>>>> pixels on the x-axis, the imshow resulted in an x-axis that went from >>>>>>>>> -10 to 110. I was looking for a simple way to suppress that behavior >>>>>>>>> and let imshow instead use the exact image extent. I believe that the >>>>>>>>> plot command has such a flag, hasn't it? (I.e. to use the exact xdata >>>>>>>>> range and not try to beautify the plot? >>>>>>>>> >>>>>>>>> Michael >>>>>>>> >>>>>>>> Is the 'extent' keyword what you're looking for? >>>>>>>> >>>>>>> >>>>>>> No, because it needs detail. I was looking for a boolean switch that >>>>>>> basically says: Respect the data, not beauty. >>>>>> >>>>>> I don't understand what you mean by 'beauty'. If your image is 100 >>>>>> pixels wide and 50 pixels tall, what is it about extent=[0,100,0,50] >>>>>> that doesn't do what you want? >>>>>> >>>>> As I wrote, that's not what is happening. I get extent=[-10,110,0,50]. >>>>> >>>>> >>>> >>>> The following script works for me: >>>> >>>> import numpy as np >>>> import matplotlib.pyplot as plt >>>> >>>> image = np.random.random((100,50)) >>>> >>>> fig = plt.figure() >>>> ax = fig.add_subplot(1, 1, 1) >>>> ax.imshow(image, extent=[0,100,0,50]) >>>> plt.show() >>>> >>>> >>> >>> I think the problem is that Michael is using ImageGrid, and apparently >>> it is not using the tight autoscaling that imshow normally uses by default. >> >> I might have confused where I had the problem as I was trying out many >> a'things yesterday, so today I only can reproduce it with subplots. Can >> I activate tight autoscaling somehow? tight_layout only influences the >> axes towards each-other not the imshows itself. >> >> >>> >>> Eric >>> >>> ------------------------------------------------------------------------------ >>> Don't let slow site performance ruin your business. Deploy New Relic APM >>> Deploy New Relic app performance management and know exactly >>> what is happening inside your Ruby, Python, PHP, Java, and .NET app >>> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >>> http://p.sf.net/sfu/newrelic-dev2dev >> >> >> >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > I think you may have encountered a bug, as Ben pointed out. Here's a > workaround: > > import matplotlib > matplotlib.use('macosx') > import matplotlib.pyplot as plt > from numpy import arange, array > > arr = arange(10000).reshape(100,100) > l = [arr,arr,arr,arr] > narr = array(l) > > axes = [] > fig = plt.figure() > for i in range(4): > axes.append(fig.add_subplot(2, 2, i)) > > for ax, im in zip(axes, narr): > ax.imshow(im, extent=[0,100,0,100]) > > plt.show() Interestingly, providing the extent does not help using subplots. And your way of creating the subplots does not have the bug in the first place. Removing the extent parameter from this still plots fine.
Hello List, Apparently, it is not straightforward to make an animation of contour plots. I found a discussion (and work-around solution including punching ducks) on the list through this link: punch the QuadContourSet until it behaves like an Artist<http://old.nabble.com/Matplotlib-1.1.0-animation-vs.-contour-plots-td32835814.html> Has there been a fix since then? It would be nice if contours work with animations like the other plots. If not, no big deal. Thanks, Mark