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
(12) |
2
(13) |
3
(4) |
4
(34) |
5
(14) |
6
(23) |
7
(26) |
8
(12) |
9
(7) |
10
(7) |
11
(9) |
12
(12) |
13
(20) |
14
(14) |
15
(13) |
16
(5) |
17
(4) |
18
(22) |
19
(29) |
20
(13) |
21
(9) |
22
(22) |
23
(3) |
24
(3) |
25
(29) |
26
(9) |
27
(10) |
28
(16) |
29
(16) |
30
(16) |
31
(9) |
|
|
|
|
|
|
On Oct 22, 2010, at 9:13 AM, Ryan May wrote: > > On Fri, Oct 22, 2010 at 8:47 AM, Christopher Fonnesbeck > <sta...@me...> wrote: >> I notice that when the number of bins in a histogram is sparse, the spacing between the bins can be irregular. For example: >> >> http://cl.ly/7e0ad7039873d5446365 >> http://cl.ly/c7cb20b567722928ac3c >> >> Is there a way of normalizing this, and better, can the default behavior result in something more consistent (i.e. publication-quality)? > > That looks like some bizarre rounding/truncation or something like it. > Can you post an example (can just use made up data) that reproduces > this? I've not seen this before, so I sense it's due to the specific > data types you're passing in. Here is a very simple example. The data are just a list of integers: http://dl.dropbox.com/u/233041/histexample.py and it results in an odd choice of intervals. (array([863, 775, 0, 271, 0, 67, 23, 0, 0, 1]), array([ 0. , 0.6, 1.2, 1.8, 2.4, 3. , 3.6, 4.2, 4.8, 5.4, 6. ]), <a list of 10 Patch objects>) If there are only 7 possible values of the data, which are evenly-spaced, it should probably not go in and create more than 6 bins as the default behavior. I know I can specify bins by hand, but when automated it would be nice to have a more sensible default. Thanks, cf
Hi Eric, thanks a lot, that was exactly I was looking for... Alex On Thu, Oct 21, 2010 at 20:23, Eric Firing <ef...@ha...> wrote: > On 10/20/2010 11:41 PM, Alexander Dietz wrote: > > Hi, > > > > I am generating a scatter plot with a colorbar, and want to pass on the > > colorbar to some function to do something with it, like > > > > plt.scatter(px, py, c=pz, ...) > > cb = plt.colorbar() > > foo(cb) > > > > > > My question: How can I extract the range of the colorbar from the cb > > object? The colorbar extends from min(pz) to max(pz), but can I access > > these values from the cb object alone, without the need to pass pz to > > foo as well? > > cb.norm.vmin > cb.norm.vmax > > Or you can get the same thing from the collection returned by scatter: > > col = scatter(...) > col.norm.vmin > col.norm.vmax > > The colorbar uses the norm and colormap from the current image (or more > generally, the color-mappable object), which in this case is the > collection generated by scatter(). > > Eric > > > > > > > Thanks > > Alex > > > > > > > > > ------------------------------------------------------------------------------ > > Nokia and AT&T present the 2010 Calling All Innovators-North America > contest > > Create new apps& games for the Nokia N8 for consumers in U.S. and > Canada > > 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in > marketing > > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > > http://p.sf.net/sfu/nokia-dev2dev > > > > > > > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America > contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in > marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On Fri, Oct 22, 2010 at 8:47 AM, Christopher Fonnesbeck <sta...@me...> wrote: > I notice that when the number of bins in a histogram is sparse, the spacing between the bins can be irregular. For example: > > http://cl.ly/7e0ad7039873d5446365 > http://cl.ly/c7cb20b567722928ac3c > > Is there a way of normalizing this, and better, can the default behavior result in something more consistent (i.e. publication-quality)? That looks like some bizarre rounding/truncation or something like it. Can you post an example (can just use made up data) that reproduces this? I've not seen this before, so I sense it's due to the specific data types you're passing in. Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
I notice that when the number of bins in a histogram is sparse, the spacing between the bins can be irregular. For example: http://cl.ly/7e0ad7039873d5446365 http://cl.ly/c7cb20b567722928ac3c Is there a way of normalizing this, and better, can the default behavior result in something more consistent (i.e. publication-quality)? Thanks, Chris
Kenshi, I'm sorry that I completely forgot about this issue. I just took a look and it seems to be due to a bug in clabel routine. The fix is easy and I'll commit it soon. Meanwhile, here is a work around. Basically, you need to draw a contour in "ax3", not in "aux_ax3". First of all, you can populate Z without for loops (note that I changed X, Y to Theta, R). Theta, R = meshgrid(theta, r) Z = (Theta/90.)**2 + (R-2)**2 Now, instead of aux_ax3.contour, use CS = aux_contour(aux_ax3, Theta, R, Z,levels,colors='k') where aux_contour is defined as def aux_contour(aux_ax, aux_X, aux_Y, Z, *kl, **kwargs): ax = aux_ax._parent_axes shape_orig = Theta.shape TR = np.array([aux_X, aux_Y]).reshape((2, -1)).transpose() # coordinates in aux_ax XY = aux_ax.transAux.transform(TR) # coordinates in ax X, Y = XY.transpose().reshape((2, shape_orig[0], shape_orig[1])) CS = ax.contour(X, Y, Z, *kl, **kwargs) return CS And do clabel with the original axes (ax3). use_clabeltext will help the labels aligned with contour lines. ax3.clabel(CS,fontsize=10, use_clabeltext=True) A complete example is attached. Regards, -JJ On Fri, Sep 17, 2010 at 7:34 PM, Kenshi hibino <hi...@ku...> wrote: > > > Jae-Joon Lee wrote: >> >> >> Another option is to use mpl_toolkits.axisartist (distributed with mpl >> 1.0). However, learning curve of the axisartist is also steep. You may >> play around with the last figure in the example below. >> >> http://matplotlib.sourceforge.net/examples/axes_grid/demo_floating_axes.html >> >> > > Jae-Joon, > Thanks for the quick reply and good advice. > > Second option you recommended is seemed to work well. > My code modified from example is attached. > > But, in semi-circle domain I can't write contour label using clabel(). > Do you know the reason why? http://old.nabble.com/file/p29737063/test2.py > test2.py > > For reference my system is python(x,y) on Windows and mpl version is 1.0 > > Thanks again. > > Kenshi > -- > View this message in context: http://old.nabble.com/contour-plot-in-semi-circle-domain-tp29699332p29737063.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
I'm trying to get a delaunay triangulation of a set of points on the surface of the torus. I'm using matplotlib.delaunay, but it seems to only give the triangulation for a flat surface. Is there any way to tell it to take the periodic boundary conditions into account, or alter the points I input such that matplotlib.delaunay interprets them as being on the surface of the torus. Perhaps another choice of package might be better, but I know very little Python. I'm really a Matlab man, and matplotlib.delaunay is very similar to the equivalent function there. So if you know of an alternative, could you point me to idiotproof example files? -- View this message in context: http://old.nabble.com/matplotlib.delauney-with-periodic-boundary-conditions-tp30027789p30027789.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Thu, Oct 21, 2010 at 4:31 AM, Gökhan Sever <gok...@gm...> wrote: > How could I change the appearance of the legend symbol in this case? > It auto-uses a patch object (rectangle in this case). > I would like to get a straight line instead. You may use proxy artists. http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist Regards, -JJ
Hello, When I plot graph with values 10^5 and more at y axis, the labels are too long and run out of the picture borders. So I get "600000" instead of "1600000" at y axis or something like this. Tried to use ==== majorFormatter = ticker.FormatStrFormatter('%e') ax.yaxis.set_major_formatter(majorFormatter) ==== but it became even worse -- "00e+00", "00e+05", "00e+06", i.e. first digits run out of picture border or I see only part of digit. Is it possible to make matplotlib automatically change picture size due to it's content? Or maybe there is some other way to solve my problem? Thanks. -- Best Regards, Dmitry Vinokurov +7 905 862 17 11 skype: d.a.vinokurov <df...@gm...>
Suppose I have two functions returning axes: def f1(): f = plt.figure() ax = f.add_axes(111) ax.plot(....) ax.lengend(....) return ax def f2(): similar to f1 now I have a figure main_fig = plt.fig() I want to merge axes from f1 and f2 in a unique axes (withou splitting the figure). For example if f1 produces a line and f2 produces another line I want to see two lines in the same plot at the end.
On 10/20/2010 11:41 PM, Alexander Dietz wrote: > Hi, > > I am generating a scatter plot with a colorbar, and want to pass on the > colorbar to some function to do something with it, like > > plt.scatter(px, py, c=pz, ...) > cb = plt.colorbar() > foo(cb) > > > My question: How can I extract the range of the colorbar from the cb > object? The colorbar extends from min(pz) to max(pz), but can I access > these values from the cb object alone, without the need to pass pz to > foo as well? cb.norm.vmin cb.norm.vmax Or you can get the same thing from the collection returned by scatter: col = scatter(...) col.norm.vmin col.norm.vmax The colorbar uses the norm and colormap from the current image (or more generally, the color-mappable object), which in this case is the collection generated by scatter(). Eric > > > Thanks > Alex > > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps& games for the Nokia N8 for consumers in U.S. and Canada > 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Dear All, Please consider the snippet at the end of the email. Admittedly, I am still quite cumbersome with the matplotlib pipeline (I am a bit unsure about how to manipulate objects and their properties). The snippet below produces two plots. I have some questions (1) for both plots: how do I add some text to the plot(possibly in latex) in a specified position and fine-tune its properties (size, bold etc...)? (2) Last generated plot: I would like to have arrows like in the previous plot, just rotated by 90 degrees so that they hit the red areas at the north and south poles. However, this does not look possible right now without shortening the arrows (there is not enough vertical space; somehow the whole aspect ratio of the plot+boundary is not 1). Any suggestions about how to fix this? Many thanks Lorenzo ####################################################################################33 #!/usr/bin/env python """ See pcolor_demo2 for a much faster way of generating pcolor plots """ from __future__ import division from pylab import * def func3(x,y): return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2) def func4(x,y): theta=arcsin(y) return cos(theta) def func5(x,y): return abs(sin(y)) def func6(x,y): return abs(cos(y)) # make these smaller to increase the resolution dx, dy = 0.05, 0.05 # x = arange(-1.0, 1.0, dx) # y = arange(-1.0, 1.0, dy) x = arange(-pi/2., pi/2., dx) y = arange(-pi/2., pi/2., dy) X,Y = meshgrid(x, y) Z = func6(X, Y) # print "Z is, ", Z ini=pi/2.+0.5 ax = subplot(111) ax.axis('off') im = imshow(Z,cmap=cm.jet, extent=(-pi/2., pi/2., -pi/2., pi/2.)) im.set_interpolation('bilinear') im.set_clip_path(Circle((0,0),pi/2., transform=ax.transData)) annotate("", xy=(-pi/2., 0), xytext=(-ini, 0), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., .2), xytext=(-ini, .2), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., -.2), xytext=(-ini, -.2), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., .4), xytext=(-ini, .4), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., -.4), xytext=(-ini, -.4), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., .6), xytext=(-ini, .6), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., -.6), xytext=(-ini, -.6), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., .8), xytext=(-ini, .8), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., -.8), xytext=(-ini, -.8), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., 1), xytext=(-ini, 1), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., -1), xytext=(-ini, -1), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., 1.2), xytext=(-ini, 1.2), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., -1.2), xytext=(-ini, -1.2), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., 1.4), xytext=(-ini, 1.4), arrowprops=dict(fc="g")) annotate("", xy=(-pi/2., -1.4), xytext=(-ini, -1.4), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., 0), xytext=(ini, 0), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., .2), xytext=(ini, .2), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., -.2), xytext=(ini, -.2), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., .4), xytext=(ini, .4), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., -.4), xytext=(ini, -.4), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., .6), xytext=(ini, .6), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., -.6), xytext=(ini, -.6), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., .8), xytext=(ini, .8), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., -.8), xytext=(ini, -.8), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., 1), xytext=(ini, 1), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., -1), xytext=(ini, -1), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., 1.2), xytext=(ini, 1.2), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., -1.2), xytext=(ini, -1.2), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., 1.4), xytext=(ini, 1.4), arrowprops=dict(fc="g")) annotate("", xy=(pi/2., -1.4), xytext=(ini, -1.4), arrowprops=dict(fc="g")) savefig("first-plot.pdf") clf() Z = func5(X, Y) ax = subplot(111,aspect='equal') ax.axis('off') im = imshow(Z,cmap=cm.jet, extent=(-pi/2., pi/2., -pi/2., pi/2.)) im.set_interpolation('bilinear') im.set_clip_path(Circle((0,0),pi/2., transform=ax.transData)) annotate("", xy=(pi/2., 0), xytext=(ini, 0), arrowprops=dict(fc="g")) annotate("", xy=(0., -1.6), xytext=(ini, 0), arrowprops=dict(fc="g")) savefig("second-plot.pdf") clf()
2010年10月21日 Stefan Mauerberger <ste...@mn...>: > My goal is to draw a grid with labels above the data. Similar to the > example 'demo curvelinear grid'. Ok, I think I cannot give you an authoritative response here, but the following might be useful for the labels: http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.text >From first glimple, I don't understand http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html either. It assumes a lot of knowledge of the techniques used imo. As a conclusion, I predict that this plot can easily grow to middle complexity, and that it might be worth using PolarAxes with grid turned off, and maybe save it as svg and remove the circle or sth like that. AFAIK, lines in PolarAxes are automatically bended, so the grid shouln't be a problem (you may use some pcolor function with nans in the values, so that only the grid is drawn) You can override the PolarAxes locator and ticklabels. Friedrich
Hi everybody, I have been using the plot_surface function to create excellent 3d surface plots. However, the colour scales with the z axis, and I cannot find any way to change this. Specifically, I am interested in making the colour change with distance from the origin - in other words, so that it scales with (x^2+y^2+z^2)^1/2. Is there any way of doing this in matplotlib? Thanks, Matt -- View this message in context: http://old.nabble.com/Changing-the-axis-that-colour-changes-with-in-surface-plots-tp30018631p30018631.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi Bala, Strange that yum did not updated, Fedora does has the latest version packaged: http://koji.fedoraproject.org/koji/packageinfo?packageID=3607 Maybe you can try to force the installation of the latest rpm by downloading it and installing it with yum. ***************************************************** Filipe Pires Alvarenga Fernandes, PhD Candidate School of Marine Science and Technology University of Massachusetts at Dartmouth 706 Rodney French Blvd., New Bedford, MA 02744 Email: fal...@um... oc...@gm... http://ocefpaf.tiddlyspot.com/ ***************************************************** On Thu, Oct 21, 2010 at 06:46, Bala subramanian <bal...@gm...> wrote: > Friends, > I am using mpl in fedora10. I installed mpl (version 0.98.5.2) with yum > previously. Since yum does not upgrade to latest mpl version, i have > downloaded the tarball to install from the source. Now i want to install mpl > in the same location as previously done by yum (info. given below). > > 1) How can force the installation to the same location as done by yum. > > 2) Will there be anyproblem if i overwrite old one with new installation. > >>>> import matplotlib >>>> matplotlib.__version__ > '0.98.5.2' >>>> matplotlib.__file__ > '/usr/lib/python2.5/site-packages/matplotlib/__init__.pyc' > > > Thank you, > Bala > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Friends, I am using mpl in fedora10. I installed mpl (version 0.98.5.2) with yum previously. Since yum does not upgrade to latest mpl version, i have downloaded the tarball to install from the source. Now i want to install mpl in the same location as previously done by yum (info. given below). 1) How can force the installation to the same location as done by yum. 2) Will there be anyproblem if i overwrite old one with new installation. >>> import matplotlib >>> matplotlib.__version__ '0.98.5.2' >>> matplotlib.__file__ '/usr/lib/python2.5/site-packages/matplotlib/__init__.pyc' Thank you, Bala
Hi, I am generating a scatter plot with a colorbar, and want to pass on the colorbar to some function to do something with it, like plt.scatter(px, py, c=pz, ...) cb = plt.colorbar() foo(cb) My question: How can I extract the range of the colorbar from the cb object? The colorbar extends from min(pz) to max(pz), but can I access these values from the cb object alone, without the need to pass pz to foo as well? Thanks Alex
Hi Frederick, thanks for your answer. The option *faceted* I already knew but this is not exactly what I want. Perhaps it would be possible to draw the grid without labels. My goal is to draw a grid with labels above the data. Similar to the example 'demo curvelinear grid'. Regards Stefan
In my interactive plots that connect with mouse scroll events (event.button), I just noticed that TkAgg reports the opposite - 'up' when the scroll direction is down and vice versa. GTKAgg and WxAgg report the correct value. I noticed this after installing ipython in a virtualenv and having problems with interactive plotting using GTKAgg and WxAgg. Figure windows would not appear, or would appear and hang the interpreter - a threading issue I guess. So I switched to TkAgg, which solved the problem, but then scrolling was mixed up. This is using stock packages for Ubuntu 10.04, with ipython 0.10.1 installed in the virtualenv with pip. I compiled and installed matplotlib 1.0 in the same virtualenv and saw the same behavior. Anyone else had these issues? -Rick
You might be able to do this (before importing pyplot or pylab): matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.preamble'] = '\usepackage{libertine}' and optionally (if you have xpdf or poppler installed): matplotlib.rcParams['ps.usedistiller'] = 'xpdf' Good luck, Jeff On Oct 20, 2010, at 3:32 PM, Thøger Emil Juul Thorsen wrote: > Sorry, perhaps I should have specified; > > I'm using usetex, and Libertine is not among the supported fonts. In the > example RC file, it said that if any font was wanted, that could be > loaded with a \usepackage command, one should request it on the mailing > list. > > > > > On Wed, 2010年10月20日 at 14:29 -0400, Stan West wrote: >>> From: Thøger Emil Juul Thorsen [mailto:th...@fy...] >>> Sent: Monday, October 18, 2010 14:04 >>> >>> I'm using the excellent font Linux Libertine for writing my thesis, in >>> which I do my plotting in matplotlib. I would really love to >>> be ablu to >>> have consistent fonts in both text and graphs - is this >>> possible? I know >>> it can be loaded by \usepackage{libertine}. >> >> For ordinary text objects, one way is to set the font.family rcParam to the >> font name. You could do this either in a matplotlibrc file in an appropriate >> location or in your code dynamically [1]. If you'll be using mathtext, also >> see the "Fonts" section and "Custom fonts" subsection at [2]; for LaTeX, [3]. >> >> [1] http://matplotlib.sourceforge.net/users/customizing.html >> >> [2] http://matplotlib.sourceforge.net/users/mathtext.html#fonts >> >> [3] http://matplotlib.sourceforge.net/users/usetex.html > > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > 10ドル million total in prizes - 4ドルM cash, 500 devices, nearly 6ドルM in marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Sorry, perhaps I should have specified; I'm using usetex, and Libertine is not among the supported fonts. In the example RC file, it said that if any font was wanted, that could be loaded with a \usepackage command, one should request it on the mailing list. On Wed, 2010年10月20日 at 14:29 -0400, Stan West wrote: > > From: Thøger Emil Juul Thorsen [mailto:th...@fy...] > > Sent: Monday, October 18, 2010 14:04 > > > > I'm using the excellent font Linux Libertine for writing my thesis, in > > which I do my plotting in matplotlib. I would really love to > > be ablu to > > have consistent fonts in both text and graphs - is this > > possible? I know > > it can be loaded by \usepackage{libertine}. > > For ordinary text objects, one way is to set the font.family rcParam to the > font name. You could do this either in a matplotlibrc file in an appropriate > location or in your code dynamically [1]. If you'll be using mathtext, also > see the "Fonts" section and "Custom fonts" subsection at [2]; for LaTeX, [3]. > > [1] http://matplotlib.sourceforge.net/users/customizing.html > > [2] http://matplotlib.sourceforge.net/users/mathtext.html#fonts > > [3] http://matplotlib.sourceforge.net/users/usetex.html
Hello, Consider these two simple lines in IPython -pylab: plt.hist(np.random.randn(1000), normed=1, histtype='step', label='test', lw=2) plt.legend() How could I change the appearance of the legend symbol in this case? It auto-uses a patch object (rectangle in this case). I would like to get a straight line instead. Thanks. -- Gökhan
> From: Thøger Emil Juul Thorsen [mailto:th...@fy...] > Sent: Monday, October 18, 2010 14:04 > > I'm using the excellent font Linux Libertine for writing my thesis, in > which I do my plotting in matplotlib. I would really love to > be ablu to > have consistent fonts in both text and graphs - is this > possible? I know > it can be loaded by \usepackage{libertine}. For ordinary text objects, one way is to set the font.family rcParam to the font name. You could do this either in a matplotlibrc file in an appropriate location or in your code dynamically [1]. If you'll be using mathtext, also see the "Fonts" section and "Custom fonts" subsection at [2]; for LaTeX, [3]. [1] http://matplotlib.sourceforge.net/users/customizing.html [2] http://matplotlib.sourceforge.net/users/mathtext.html#fonts [3] http://matplotlib.sourceforge.net/users/usetex.html
Friends, I tried to do a 3d scatter plot. The following is my code. However i dnt know how to set different colors and marker for x, y and z. Someone kindly help in doing the same. I tried to give a sequence of colors as c=['black','red','blue'] but i dnt get what i want. ---------------------- import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt fig = plt.figure(figsize=(4,4)) ax = Axes3D(fig) x=np.reshape(np.loadtxt('PR1'),15000) y=np.reshape(np.loadtxt('PR2'),15000) z=np.reshape(np.loadtxt('PR3'),15000) ax.scatter(x[:],y[:],z[:], marker='o') plt.savefig('img.png',dpi=200) plt.show() Thanks, Bala
On 10/19/2010 05:44 AM, vaishu wrote: > > Hey guys, > > I am a new user to the python& matplotlib, this might be a simple question > but I searched the internet for hours and couldn't find a solution for this. > > I am plotting precipitation data from which is in the NetCDF format. What I > find weird is that, the data doesn't have any negative values in it.(I > checked that many times,just to make sure). But the value in the colorbar > starts with a negative value (like -0.0000312 etc). It doesnt make sense > because I dont do any manipulations to the data, other that just selecting a > part of the data from the big file and plotting it. > > So my code doesn't much to it. Here is the code: > > from mpl_toolkits.basemap import Basemap > import numpy as np > import matplotlib.pyplot as plt > from netCDF4 import Dataset > cd progs > f=Dataset('V21_GPCP.1979-2009.nc') > lats=f.variables['lat'][:] > lons=f.variables['lon'][:] > prec=f.variables['PREC'][:] > la=lats[31:52] > lo=lons[18:83] > pre=prec[0,31:52,18:83] > m = Basemap(width=06.e6,height=05.e6,projection='gnom',lat_0=15.,lon_0=80.) > x, y = m(*np.meshgrid(lo,la)) > m.drawcoastlines() > m.drawmapboundary(fill_color='lightblue') > m.drawparallels(np.arange(-90.,120.,5.),labels=[1,0,0,0]) > m.drawmeridians(np.arange(0.,420.,5.),labels=[0,0,0,1]) > cs=m.contourf(x,y,pre,50,cmap=plt.cm.jet) > plt.colorbar() > > The output that I got for that code was a beautiful plot, with the colorbar > starting from the value -0.00001893, and the rest are positive values, and I > believe are correct. Its just the minimum value thats bugging me. > http://old.nabble.com/file/p30001558/jan1979plot.png > > I would like to know: > > Is there anything wrong in my code? cos I know that the data is right. I can't reproduce the problem without the data file; can you supply it? Also, what version of matplotlib are you using? > Is there a way to manually change the value to 0? > Is it right for the values in the colorbar to change everytime we run the > code, cos for the same data, the next time I run the code, the values go > like this " -0.00001893, 2.00000000, 4.00000000, 6.00000000 etc" > I want to customize them to "0.0, 2.0, 4.0, 6.0 etc" In your call to contourf, instead of giving a number of levels, give a sequence of the desired levels, e.g.: cs=m.contourf(x,y,pre,np.arange(0, 20, 0.5),cmap=plt.cm.jet) Eric > > > Thanks, > Vaishu >
On Tue, Oct 19, 2010 at 1:27 PM, Friedrich Romstedt < fri...@gm...> wrote: > > My idea would be to add another layer. Meaning to provide a class > which *creates* Axes, and which has other instances of *this class* in > an attribute. The attrib would be scalar. Repetition is done via > recursive call so some privat e method, initiated by a call to a > public commit method. So you would do in pseudo-code: > > level0 = LevelAxesGenerator() # NOT actually creating the Axes, see below. > level1 = LevelAxesGenerator(leaf=level0, repeat=10, direction='x') # > NOT creating too. > > level1.create(width=foo, height=bar) # Subdividing automatically, > generating Axes in the recursive calls on level0-level > > This shouldn't be super-hard. > > Sorry, I cannot help you with implementation currently. > > When you code it, think about general usability, also for other users, > if you're inclined. I would maybe have been such a user in the past. > > ``.create()`` could maybe called ``.commit()``, this is more specific. > Create can mean anything. > > You could even add a .populate() method, so that you can derive from > ``LevelAxesGenerator`` and the instances automatically populate their > axes based on the "coordinate" tuple (level0, level1, level2, ...). > This would be really neat, and it's not too specific, because it'll be > the main use of this level-functionality. Hi Friedrich. Thanks for your comments and suggestions. What I need to clarify is the following. First consider some simple plot A: it has axes, data points, tick marks, labels, etc., and for all these elements there are associated absolute x-y coordinates on the canvas. If now we make this plot A one of the subplots in a collection of, say, 12 subplots, arranged as 3 rows of 4 subplots each, all the x-y coordinates associated with the original plot A will have to be translated and scaled, so that the subplot lands in the right place on the canvas, and has the appropriate size. This process of translation and scaling is what I want to pinpoint: What exactly is the connection between running the add_subplot method and the translation+scaling that it entails? The reason I need to do this is that for the hierarchical containment scheme I described in my original post, this translation+scaling operation will have to be done at every level. It is not clear to me how the scheme you describe would take care of all these repeated translation/scaling transformations. I could use some guidance to the source code. What would be a good entry point for me to answer the questions above by reading the source code? (Maybe these questions would be more appropriate for the developers' list.) ~kj