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
(10) |
2
(10) |
3
(9) |
4
(3) |
5
(2) |
6
(6) |
7
(12) |
8
(21) |
9
(4) |
10
(19) |
11
(7) |
12
(2) |
13
(28) |
14
(13) |
15
(27) |
16
(17) |
17
(21) |
18
(22) |
19
(3) |
20
(25) |
21
(17) |
22
(16) |
23
(28) |
24
(19) |
25
(4) |
26
(4) |
27
(23) |
28
(13) |
29
(15) |
30
(19) |
|
|
On Mon, Sep 20, 2010 at 5:12 PM, Brian Blais <bb...@br...> wrote: > Hello, > > I am trying to do some simple calculations in a loop, and draw a plot > periodically within the loop, and the drawing is not updating. I'm using > the Enthought Python Distribution which is using Matplotlib 0.99.3 with > python 2.6.5 on Snow Leopard, OSX 10.6.4, and am running it in ipython with > the -pylab flag (and I've tried with the -wthread flag too). A sample piece > of code below. It is actually drawing, because when I control-C to stop, it > shows the plot. > > from pylab import * > from numpy import * > import sys > > def dot(): > sys.stdout.write('.') > sys.stdout.flush() > > def busy_loop(): > > for i in range(1000): > r=rand(100,100) > > return r > > for t in range(1000): > > r=busy_loop() > > clf() > imshow(r,interpolation='nearest',cmap=cm.gray) > draw() > show() > > dot() > > > > > and I've set in my matplotlibrc - backend : TkAgg, but it doesn't > work with WxAgg either. > > Am I missing something? Is this an idiom that needs to be > avoided/replaced? > > > Any help would be great! > > > thanks, > > Brian Blais > > > Brian, First, I would suggest using time.sleep() to do your busy loop: >>> import time >>> time.sleep(0.1) to sleep for a tenth of a second. Second, you have the show() function within the loop. Call the show() function only once (in interactive mode), and draw() can be used to update the graph. Also note that some plotting functions return objects that have a function like "update_data" that would allow you to modify the plot without having to call clf(). Some of these examples in the given link might be overkill for your needs: http://matplotlib.sourceforge.net/examples/animation/index.html but they may be useful to better understand how animations can be done. Also note that the next release of matplotlib will include a much easier to use module to create animations (of course, if you are daring, you could install the latest matplotlib from source). I hope this helps! Ben Root
Benjamin Root-2 wrote: > > On Sun, Sep 19, 2010 at 5:23 PM, bevan j <be...@gm...> wrote: > >> selindex = value.pop(0) >> AttributeError: 'tuple' object has no attribute 'pop' >> > > Didn't we just have a bug report/fix for this one? > > Sorry if it has already been reported I searched in the bug reports for qt4agg and didn't find anything. Although I may have been looking in the wrong place. I have also noticed that editing some parameters (or pressing apply without any changes) alters others. For instance if I have: from matplotlib import pyplot import numpy as np a = np.random.rand(12) fig = pyplot.figure() ax = fig.add_subplot(111) wdth = 0.20 ind = np.arange(a.size) mon_ticks =('Jan','Feb','Mar','Apr','May','Jun','Jul', 'Aug', 'Sep', 'Oct', 'Nov','Dec') ax.bar(ind, a, wdth, color='0.8') ax.set_xticks(ind) ax.set_xticklabels(mon_ticks) pyplot.show() Then pressing apply removes the ticks and tick label setting. Hopefully this is adressed in the bug report you mention. Thanks. -- View this message in context: http://old.nabble.com/Qt4Agg-backend---edit-curves-and-axis-parameters-tp29754925p29764881.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hello, I am trying to do some simple calculations in a loop, and draw a plot periodically within the loop, and the drawing is not updating. I'm using the Enthought Python Distribution which is using Matplotlib 0.99.3 with python 2.6.5 on Snow Leopard, OSX 10.6.4, and am running it in ipython with the -pylab flag (and I've tried with the -wthread flag too). A sample piece of code below. It is actually drawing, because when I control-C to stop, it shows the plot. from pylab import * from numpy import * import sys def dot(): sys.stdout.write('.') sys.stdout.flush() def busy_loop(): for i in range(1000): r=rand(100,100) return r for t in range(1000): r=busy_loop() clf() imshow(r,interpolation='nearest',cmap=cm.gray) draw() show() dot() and I've set in my matplotlibrc - backend : TkAgg, but it doesn't work with WxAgg either. Am I missing something? Is this an idiom that needs to be avoided/replaced? Any help would be great! thanks, Brian Blais -- Brian Blais bb...@br... http://web.bryant.edu/~bblais http://bblais.blogspot.com/
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chr...@gm...> wrote: > Hi, > > Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve > to a set of data points? > You could also experiment at zunzun.com. Choose 2D sigmoidal from the 2D function scroll list. -- Gökhan
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chr...@gm...> wrote: > Hi, > > Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve > to a set of data points? > > Regards, > Chris > I am very curious to know how this is done. I have seen in many Cloud Condensation Nuclei (CCN) counter calibration experiments [e.g. Rose et. al. (2008) - p1156, fig2 http://www.atmos-chem-phys.net/8/1153/2008/acp-8-1153-2008.html] people use sigmoidal fits. Never seen a code is shared so far or how it is obtained. from scipy.optimize import leastsq could be a good point to start. To me this fit is very likely a least square minimization problem. You have your tanh(x) or 1/(1+e^-x) as a sigmoidal function, and you should find the points that will make the error minimal for a given discrete points/measurements. from scipy.optimize import curve_fit might be another way to approach. -- Gökhan
Hello, Is there a way to do "asynchronous" plots in matplotlib? By asynchronous I mean plots that simply spawn a new process and do not stop the program while the plot is visible? For example, I would like to be able to run a script that plots something and have the program end with the plot still useable so I can run the script again and generate a slightly different plot that I can compare side by side with the first. John
On Mon, Sep 20, 2010 at 3:36 PM, Chris Spencer <chr...@gm...> wrote: > Hi, > > Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve > to a set of data points? > > Regards, > Chris > > That question would probably be better asked on the scipy-users list. I believe there is something for that, but I am not familiar with it. Ben Root
Hi, Does Matplotlib/Numpy/Scipy contain the ability to fit a sigmoid curve to a set of data points? Regards, Chris
Eli Brosh <eb...@gm...> writes: > I need to prepare two versions of figures: color and BW(Black&White). > Is there an easy way to produce just the colored version and than use some > command or script to turn it to BW or grayscale? For some really simple plots, and for pdf output only, you can try rc('pdf', inheritcolor=True) This produces a (possibly invalid) PDF file that doesn't set any colors, and will usually be rendered in black on white. I implemented this in response to a request to be able to inherit the current foreground color in pdfLaTeX: if you set the color to e.g. red and include such a file, it will be rendered in red. This was quite some time ago, and matplotlib now has more drawing primitives, not all of which work sensibly with this option. In some examples you get all-black images, in some you get color in one part of the image. But I guess this option only ever made sense for pretty simple line drawings. -- Jouni K. Seppänen http://www.iki.fi/jks
On Mon, Sep 20, 2010 at 1:01 PM, Eli Brosh <eb...@gm...> wrote: > OK, > This worked for me for turning the figure to black and white: > After saving the figure in colors I write > > fig=gcf() > > for o in fig.findobj(matplotlib.lines.Line2D): > o.set_color('k') > > for o in fig.findobj(matplotlib.text.Text): > o.set_color('k') > > Than I save it as black and white. > > It is beyond my programming skills, but I wish we could have a built in > function of this type. > Perhaps as: > > Fig_BW=makeBW(fig) > > Regards, > Eli > > > Eli, I am glad that worked for you. Ultimately, Friedrich's approach will make it into a released version of matplotlib so that making a figure into a black and white figure will be something as simple as fig.set_gray(True) Which, I hope, will satisfy your needs in the future. Ben Root
OK, This worked for me for turning the figure to black and white: After saving the figure in colors I write fig=gcf() for o in fig.findobj(matplotlib.lines.Line2D): o.set_color('k') for o in fig.findobj(matplotlib.text.Text): o.set_color('k') Than I save it as black and white. It is beyond my programming skills, but I wish we could have a built in function of this type. Perhaps as: Fig_BW=makeBW(fig) Regards, Eli On Mon, Sep 20, 2010 at 6:19 PM, Benjamin Root <ben...@ou...> wrote: > On Mon, Sep 20, 2010 at 11:13 AM, Eli Brosh <eb...@gm...> wrote: > >> Hello Friedrich, >> I tried your second solution: >> >> figure = matplotlib.figure.Figure() >> ... do plotting ... >> ... save as colour ... >> figure.set_gray(True) >> ... save as b/w ... >> >> but it gives me an error message: >> fig.set_gray(True) >> AttributeError: 'Figure' object has no attribute 'set_gray' >> >> I got the same error message when trying in in pylab as: >> fig1=gcf() >> fig1.set_gray(True) >> >> and when generating the figure with the command >> fig1 = matplotlib.figure.Figure() >> >> I am using matplotlib 0.99.1.1 on ubuntu 10.04/ >> >> Is there another way to do it? >> >> Thanks, >> Eli >> >> > Eli, the feature is highly experimental, and is available only though fork > of matplotlib that Friedrich made in the link he provided you. You would > have to install that matplotlib from its source at that link. > > Ben Root > >
On Mon, Sep 20, 2010 at 11:13 AM, Eli Brosh <eb...@gm...> wrote: > Hello Friedrich, > I tried your second solution: > > figure = matplotlib.figure.Figure() > ... do plotting ... > ... save as colour ... > figure.set_gray(True) > ... save as b/w ... > > but it gives me an error message: > fig.set_gray(True) > AttributeError: 'Figure' object has no attribute 'set_gray' > > I got the same error message when trying in in pylab as: > fig1=gcf() > fig1.set_gray(True) > > and when generating the figure with the command > fig1 = matplotlib.figure.Figure() > > I am using matplotlib 0.99.1.1 on ubuntu 10.04/ > > Is there another way to do it? > > Thanks, > Eli > > Eli, the feature is highly experimental, and is available only though fork of matplotlib that Friedrich made in the link he provided you. You would have to install that matplotlib from its source at that link. Ben Root
Thank you John and Ryan, I like the hatching solution very much. Eli On Mon, Sep 20, 2010 at 3:48 PM, John Hunter <jd...@gm...> wrote: > On Mon, Sep 20, 2010 at 8:43 AM, Ryan May <rm...@gm...> wrote: > > > It's not what one would call a turn-key solution, but it is possible: > > > > > http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html > > There is also hatching > > http://matplotlib.sourceforge.net/examples/pylab_examples/hatch_demo.html > > JDH >
Hello Friedrich, I tried your second solution: figure = matplotlib.figure.Figure() ... do plotting ... ... save as colour ... figure.set_gray(True) ... save as b/w ... but it gives me an error message: fig.set_gray(True) AttributeError: 'Figure' object has no attribute 'set_gray' I got the same error message when trying in in pylab as: fig1=gcf() fig1.set_gray(True) and when generating the figure with the command fig1 = matplotlib.figure.Figure() I am using matplotlib 0.99.1.1 on ubuntu 10.04/ Is there another way to do it? Thanks, Eli On Mon, Sep 20, 2010 at 11:14 AM, Friedrich Romstedt < fri...@gm...> wrote: > 2010年9月20日 Eli Brosh <eb...@gm...>: > > Hello, > > I need to prepare two versions of figures: color and BW(Black&White). > > Is there an easy way to produce just the colored version and than use > some > > command or script to turn it to BW or grayscale? > > I thought that converting from color to BW really means: "in all object > in > > the figure, turn any color that is not white to black". > > Is there an easy way to implement this? > > http://github.com/friedrichromstedt/matplotlib > > I implemented a RC setting 'gray'. Turn it on by setting either > matplotlib.rcParams['gray'] = True or by setting it in your > matplotlibrc file. > > You can also gray out any artist (e.g., the figure), by calling > artist.set_gray(True). > > figure = matplotlib.figure.Figure() > ... do plotting ... > ... save as colour ... > figure.set_gray(True) > ... save as b/w ... > > If you're using pyplot or pylab, I'm not sure, but I think there is a > function gcf() which gives you the current figure object so that you > can turn gray on there. pylab support should be placed on the TODO > list, I would appreciate feedback on the preferred pylab way, since > I'm not a pylab user at all. I think a pylab function gray(boolean) > would do it. > > It's beta, so try it out. It's tested, though. > > Friedrich >
On Sun, Sep 19, 2010 at 5:23 PM, bevan j <be...@gm...> wrote: > selindex = value.pop(0) > AttributeError: 'tuple' object has no attribute 'pop' > Didn't we just have a bug report/fix for this one? Ben Root
On Sun, Sep 19, 2010 at 10:40 PM, Kelson Zawack <zaw...@gi... > wrote: > Is there a way to put the legend for a graph inside the margin instead > of on the graph, in other words to put the legend where excel would? Look into either "figlegend<http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.figlegend>" or the "bbox_to_anchor" keyword argument to "legend". You can use either of these to place the legend outside of the axis boundaries. However, this won't resize the original axes. Sometimes, it's easier to just make a new, separate axis for the legend, and resize the original axis. This is easily done with the axes_grid toolkit. E.g.: import matplotlib.pyplot as plt from matplotlib import cm import numpy as np from mpl_toolkits.axes_grid1 import make_axes_locatable # Make some data data = np.random.random(10) x = np.arange(data.size) colors = cm.jet(x.astype(np.float) / x.size) names = [repr(i) for i in range(data.size)] # Basic bar plot fig = plt.figure() ax = fig.add_subplot(111) bars = ax.bar(x, data, color=colors) # Now make a new axis for the legend that takes up 10% of the width... divider = make_axes_locatable(ax) legend_ax = divider.append_axes('right', '10%') legend_ax.axis('off') # Now make the legend on the new axis legend_ax.legend(bars, names, mode='expand', frameon=False) plt.show() Hope that helps! -Joe
On Mon, Sep 20, 2010 at 9:22 AM, Jonathan Slavin <js...@cf...>wrote: > A non-matplotlib way to do this is to use ImageMagick or GraphicsMagick: > gm convert -colorspace Gray color_image.png bw_image.png > in GraphicsMagick or using the ImageMagick routine "convert": > convert -colorspace Gray color_image.png bw_image.png > > I think it works on a wide variety of image formats. > > Jon > > A word of warning on this approach though... If the graphics formats are vector-based (ps, eps, svg, etc...), then ImageMagick will destroy the vector information in the process, even if the output format is also vector based. This is because ImageMagick is a raster-based library and all of its algorithms operate upon raster data. So, if this is for a publication, ImageMagick is not advised. I also have another approach that allows you to convert a colormap into a greyscale version of itself, but wouldn't work on colored lines or anything like that. I suggest going with Friedrich's approach. Ben Root
A non-matplotlib way to do this is to use ImageMagick or GraphicsMagick: gm convert -colorspace Gray color_image.png bw_image.png in GraphicsMagick or using the ImageMagick routine "convert": convert -colorspace Gray color_image.png bw_image.png I think it works on a wide variety of image formats. Jon > Hello, > I need to prepare two versions of figures: color and BW(Black&White). > Is there an easy way to produce just the colored version and than use > some command or script to turn it to BW or grayscale? > I thought that converting from color to BW really means: "in all > object in the figure, turn any color that is not white to black". > Is there an easy way to implement this? > > Thanks > Eli
On Mon, Sep 20, 2010 at 8:43 AM, Ryan May <rm...@gm...> wrote: > It's not what one would call a turn-key solution, but it is possible: > > http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html There is also hatching http://matplotlib.sourceforge.net/examples/pylab_examples/hatch_demo.html JDH
On Sun, Sep 19, 2010 at 11:32 PM, Eli Brosh <eb...@gm...> wrote: > Hello, > I need to prepare a black&white bar chart with several sets of bars. > Now, I have white bars and black bars but I need more colorings that are > distinguishable in black&white. > Is it possible to make bars filled with some texture or tiling or a grid? > Excel has this function but I could not find a way to do it in > python/matplotlib. It's not what one would call a turn-key solution, but it is possible: http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
2010年9月20日 Eli Brosh <eb...@gm...>: > Hello, > I need to prepare two versions of figures: color and BW(Black&White). > Is there an easy way to produce just the colored version and than use some > command or script to turn it to BW or grayscale? > I thought that converting from color to BW really means: "in all object in > the figure, turn any color that is not white to black". > Is there an easy way to implement this? http://github.com/friedrichromstedt/matplotlib I implemented a RC setting 'gray'. Turn it on by setting either matplotlib.rcParams['gray'] = True or by setting it in your matplotlibrc file. You can also gray out any artist (e.g., the figure), by calling artist.set_gray(True). figure = matplotlib.figure.Figure() ... do plotting ... ... save as colour ... figure.set_gray(True) ... save as b/w ... If you're using pyplot or pylab, I'm not sure, but I think there is a function gcf() which gives you the current figure object so that you can turn gray on there. pylab support should be placed on the TODO list, I would appreciate feedback on the preferred pylab way, since I'm not a pylab user at all. I think a pylab function gray(boolean) would do it. It's beta, so try it out. It's tested, though. Friedrich
On 17 September 2010 16:26, Simon S. Clift <ss...@gm...> wrote: > I have a data set that is in the form of an irregular 2D grid with > associated values, one for each node. I would like to plot this as a > raised surface, with colours that indicate the z-value. Somehow I > didn't find just quite the example I was looking for. After digging > around in the matplotlib and mpl_toolkits.mplot3d I was able to solve > the problem. To save the next person the trouble, here is my > annotated example. Comments and improvements are most welcome. I'd > be happy to have a version of this included as an official example, if > it passes muster. > Thanks for this. The tripcolor function does what you want in 2D, but it hasn't yet been extended to work with 3D axes. It was on my 'to do' list, and you've motivated me to start looking at it. When it's done, your example code can be much simpler as the triangulation and colormap manipulation will all be done for you. Ian
Hello, I need to prepare a black&white bar chart with several sets of bars. Now, I have white bars and black bars but I need more colorings that are distinguishable in black&white. Is it possible to make bars filled with some texture or tiling or a grid? Excel has this function but I could not find a way to do it in python/matplotlib. Thanks, Eli
Hello, I need to prepare two versions of figures: color and BW(Black&White). Is there an easy way to produce just the colored version and than use some command or script to turn it to BW or grayscale? I thought that converting from color to BW really means: "in all object in the figure, turn any color that is not white to black". Is there an easy way to implement this? Thanks Eli
Is there a way to put the legend for a graph inside the margin instead of on the graph, in other words to put the legend where excel would? I have a stacked bar graph with many categories and so the legend is vary large and there is little dead space on the graph. As a result if the legend is on the graph it covers up one of the bars.