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
(13) |
3
(5) |
4
(5) |
5
(21) |
6
(10) |
7
(9) |
|
8
(4) |
9
(11) |
10
(9) |
11
(11) |
12
(25) |
13
(5) |
14
(2) |
|
15
(5) |
16
(8) |
17
(16) |
18
(11) |
19
(15) |
20
(5) |
21
(8) |
|
22
(4) |
23
(24) |
24
(9) |
25
(14) |
26
(5) |
27
(28) |
28
(2) |
|
29
(13) |
30
(14) |
31
(11) |
|
|
|
|
|
From: jeffsp <je...@gm...> - 2012-01-04 18:14:23
|
I have been wondering the same thing. Matlab is able to prevent labels from
overlapping each other. Why can't matplotlib?
Chris Rodgers-7 wrote:
>
> Hi
>
> Whenever I create figures with at least 3x3 subplots, the x-tick
> labels overlap with each other and they also overlap with the title of
> the adjacent subplot, rendering the entire figure illegible. I know
> that I can fine-tune the plot to look exactly the way I want with
> "wspace" and "hspace" for instance, but I don't understand why this is
> the default behavior. I wonder if I have a system font issue, such
> that matplotlib thinks the fonts are smaller than they really are.
>
> My questions:
> 1) Is this the intended behavior of matplotlib, or is there something
> wrong with my installation?
> 2) Assuming I don't have an installation issue, is there a very
> general parameter I can change so that the overlap doesn't occur,
> rather than manually adjusting every figure?
>
>
> Minimal code to reproduce the problem:
>
> import numpy as np
> import matplotlib.pyplot as plt
> plt.figure()
> plt.subplot(331)
> plt.subplot(334)
> plt.plot(np.arange(10000))
> plt.title('Title')
> plt.show()
>
>
> I'm attaching the output figure, although I'm not sure if the list
> accepts attachments. The x-tick labels on subplot 334 overlap each
> other, and the title of subplot 334 overlaps with the x-tick labels in
> subplot 331.
>
>
> System:
> Ubuntu 10.04 x64
> All packages are the stable versions from Synaptic, including ipython,
> python, numpy, matplotlib 0.99.1.1
> I've also tried the Enthought distribution with matplotlib 1.0.1 and
> the results are the same
> I've tried both "Wx" and "Tk" backends and the results are the same
> I've tried `matplotlib.rcParams['xtick.labelsize'] = 'x-small'`, and
> this does make the labels smaller, but for sufficiently large numbers
> the overlap still occurs.
>
> Thanks for any help!
> Chris
>
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
--
View this message in context: http://old.nabble.com/Subplot-x-tick-labels-overlap-with-each-other-and-with-titles-tp31560643p33080989.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
|
|
From: Eric F. <ef...@ha...> - 2012-01-04 01:57:08
|
On 12/30/2011 11:41 AM, Stephen Webb wrote:
> Hello all,
>
> I have a python module that requires making about 24 different kinds of
> plots, and to keep things tidy I put them all in different modules,
> which I then import.
>
> All the import calls are at the head of the top module. There is one
> plotting call inside a while loop, and it is returning blank plots saved
> in the proper location. Blank meaning no axes, so it is a totally empty
> .png file. After the loop, the first plot called is being saved, but all
> the subsequent plots are saving as blank. I begin every plotting module
> with matplotlib.pyplot.clf() and then write out the individual plotting
> commands.
>
> This worked fine when everything was in one gigantic module, but I am at
> a loss for why it has stopped working once I put everything into submodules.
One way or another, I think you are plotting in one figure, and then
saving another (empty) figure. This type of thing typically comes from
mixing pyplot state-machine style with object style. It has happened to
me. The problem is that pyplot commands create a new figure if they
don't find an existing "current figure". The easiest way to solve this
problem is to use only the minimal pyplot commands, and do everything
else with explicit references to figures and axes.
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.plot([1,2,3])
fig.savefig("test.png")
plt.close(fig)
If you use the pattern above, then it is always clear where the plotting
is going and what is being written out. You are probably better off
creating a figure when you are ready to plot in it, and closing it when
finished, rather than trying to recycle it by clearing it. There will be
very little difference in the time required.
Eric
>
> Thanks for your help,
>
> Stephen D. Webb
> Associate Research Scientist
> Tech-X Corporation
> http://www.txcorp.com
>
> e: sw...@tx...
> 5621 Arapahoe Ave. Suite A
> Boulder, CO 80303 USA
>
>
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: Tony Yu <ts...@gm...> - 2012-01-03 22:07:16
|
On Tue, Jan 3, 2012 at 11:57 AM, Mario Fuest <mar...@ao...> wrote:
> Hi,
>
> Maybe a bad idea to ask a question on x-mas. Well, I hope it’s not that
> unpolite to push one‘s questions. :)
>
> Basically I just want to set a fixed width/height on my figure. That
> should be possible?
>
> Mario Fuest <mar...@ao...> schrieb am Sat, 24. Dec 16:42:
> > Hi there,
> >
> > I want to examine a vector field and therefore i used "quiver" to
> > visualize said field:
> >
> > > import numpy as np
> > > import matplotlib.pyplot as plt
> > >
> > > # points
> > > x, y = np.meshgrid(np.arange(0, 2*np.pi, 0.1),
> > > np.arange(0, 1*np.pi, 0.1))
> > > # derivatives
> > > dx = -2*np.sin(x)*np.cos(y)
> > > dy = np.cos(x)*np.sin(y)
> > >
> > > # plot
> > > plt.figure()
> > > plt.quiver(dx, dy, color='b')
> > >
> > > # beautiful axis
> > > a = plt.gca()
> > > x_a, y_a = a.get_xaxis(), a.get_yaxis()
> > > a.axis('tight')
> > > # TODO: We should not multiply with 10 here.
> > > x_a.set_ticks(np.arange(0, 2*np.pi*10+1, np.pi*10/4))
> > > y_a.set_ticks(np.arange(0, 1*np.pi*10+1, np.pi*10/4))
> > > labels = [
> > > r'$0$',
> > > r'$\frac{1}{4}\pi$',
> > > r'$\frac{1}{2}\pi$',
> > > r'$\frac{3}{4}\pi$',
> > > r'$\pi$',
> > > r'$\frac{5}{4}\pi$',
> > > r'$\frac{3}{2}\pi$',
> > > r'$\frac{7}{4}\pi$',
> > > r'$2 \pi$']
> > > a.set_xticklabels(labels)
> > > a.set_yticklabels(labels[:5])
> > >
> > > # show
> > > plt.show()
> >
> > (The plot looks like a double swirl, if anyone is interested in that
> > information)
> >
> > At first I do not know why I have to multiply with 10 at the ticks, but
> > thats not the point.
> >
> > It is much more important that I would like to set the image to a
> > certain width before saving. It should be both "tight" and "equal", so
> > after setting the width the height could be calculated automatically.
> >
> > As a workaround I use the images and strech them vertically, but then
> > the x/y axis tick labels look strange.
> >
> > So: How to set a certain width?
> >
> > Thanks and a merry Christmas,
> > Keba
>
>
You can try
>>> ax.set_aspect('equal')
>>> ax.autoscale(tight=True)
The order doesn't seem to matter.
-Tony
|
|
From: Mario F. <mar...@ao...> - 2012-01-03 16:58:35
|
Hi,
Maybe a bad idea to ask a question on x-mas. Well, I hope it’s not that
unpolite to push one‘s questions. :)
Basically I just want to set a fixed width/height on my figure. That
should be possible?
Mario Fuest <mar...@ao...> schrieb am Sat, 24. Dec 16:42:
> Hi there,
>
> I want to examine a vector field and therefore i used "quiver" to
> visualize said field:
>
> > import numpy as np
> > import matplotlib.pyplot as plt
> >
> > # points
> > x, y = np.meshgrid(np.arange(0, 2*np.pi, 0.1),
> > np.arange(0, 1*np.pi, 0.1))
> > # derivatives
> > dx = -2*np.sin(x)*np.cos(y)
> > dy = np.cos(x)*np.sin(y)
> >
> > # plot
> > plt.figure()
> > plt.quiver(dx, dy, color='b')
> >
> > # beautiful axis
> > a = plt.gca()
> > x_a, y_a = a.get_xaxis(), a.get_yaxis()
> > a.axis('tight')
> > # TODO: We should not multiply with 10 here.
> > x_a.set_ticks(np.arange(0, 2*np.pi*10+1, np.pi*10/4))
> > y_a.set_ticks(np.arange(0, 1*np.pi*10+1, np.pi*10/4))
> > labels = [
> > r'$0$',
> > r'$\frac{1}{4}\pi$',
> > r'$\frac{1}{2}\pi$',
> > r'$\frac{3}{4}\pi$',
> > r'$\pi$',
> > r'$\frac{5}{4}\pi$',
> > r'$\frac{3}{2}\pi$',
> > r'$\frac{7}{4}\pi$',
> > r'$2 \pi$']
> > a.set_xticklabels(labels)
> > a.set_yticklabels(labels[:5])
> >
> > # show
> > plt.show()
>
> (The plot looks like a double swirl, if anyone is interested in that
> information)
>
> At first I do not know why I have to multiply with 10 at the ticks, but
> thats not the point.
>
> It is much more important that I would like to set the image to a
> certain width before saving. It should be both "tight" and "equal", so
> after setting the width the height could be calculated automatically.
>
> As a workaround I use the images and strech them vertically, but then
> the x/y axis tick labels look strange.
>
> So: How to set a certain width?
>
> Thanks and a merry Christmas,
> Keba
>
> ------------------------------------------------------------------------------
> Write once. Port to many.
> Get the SDK and tools to simplify cross-platform app development. Create
> new or port existing apps to sell to consumers worldwide. Explore the
> Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
> http://p.sf.net/sfu/intel-appdev
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
|
|
From: David W. <dav...@gm...> - 2012-01-03 16:23:12
|
Paul, Have you tried using virtualenv with Python 2.7? I'm in the same situation and I find using a virtual environment for different configuration schemes allows me to have the up-to-date Python modules without the Mac's "semi-legacy" Python version. It's fairly simple to set up - if you're interested I can discuss the details with you. Cheers, Dave ---- David Welch dav...@gm... Something you entered transcended parameters. So much is unknown. -Salon Magazine, Error Haiku Challenge On 29Dec, 2011, at 9:15 AM, Paul Beard wrote: > This is turning out to be complicated. Is there any easier way? > > It may be something as simple as a damaged archive, as this doesn't look right: > > [/home/paul/src/basemap-1.0.2]:: find . -name setup.py > (pa...@sh...)-(07:02 AM / Thu Dec 29) > > It makes this step difficult: > 3) cd back to the top level basemap directory (basemap-X.Y.Z) and > run the usual 'python setup.py install'. Check your installation > by running "from mpl_toolkits.basemap import Basemap" at the python > prompt. > > I have tried easy-install (it wasn't). I have tried pulling from git: > python setup.py build > Traceback (most recent call last): > File "setup.py", line 42, in <module> > from setupext import build_agg, build_gtkagg, build_tkagg,\ > File "/usr/home/paul/src/matplotlib/setupext.py", line 184, in <module> > basedirlist = basedir[sys.platform] > KeyError: 'freebsd8' > > I tried the packaged version on OS X Lion: > > <Screen Shot 2011-12-29 at 6.59.57 AM.png> > > Built for OS X 10.3? Really? > > I'm not installing fink or macports or homebrew: if it doesn't install from source without a duplicated file hierarchy I'm not interested. > > Any hope here? > > -- > Paul Beard > > Are you trying to win an argument or solve a problem? > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Neacsa B. V. <nea...@ya...> - 2012-01-03 09:40:25
|
Hello, So I'm having a problem when trying to integrate networkx with matplotlib 1.0.1. The problem is the same as the one in these posts: http://stackoverflow.com/questions/8644233/networkx-and-matplotlib-axes-error http://groups.google.com/group/networkx-discuss/tree/browse_frm/month/2010-08/e325429fcc342798?rnum=81&_done=/group/networkx-discuss/browse_frm/month/2010-08? Now going back to 0.99 isn't really an option, and for 1.0.1 a quick and dirty fix for my problem was to add in axes.py, line 1354: def _sci(self, im): """ helper for :func:`~matplotlib.pyplot.sci`; do not use elsewhere. """ if isinstance(im, matplotlib.contour.ContourSet): if im.collections[0] not in self.collections: raise ValueError( "ContourSet must be in current Axes") elif im not in self.images and im not in self.collections: # and not isinstance(im, matplotlib.collections.CircleCollection): raise ValueError( "Argument must be an image, collection, or ContourSet in this Axes") self._current_image = im This however isn't really a fix but a hack to get it working and I don't know how this could affect other parts of matplotlib. So I guess my questions are: 1. Is this issue fixed in some newer version than 1.0.1 and if so from which? 2. If not will this bug be handled in a future version? 3. If not to 1 and 2 is there any other 'cleaner' hack to fix this problem ? Regards, Bogdan |
|
From: Jae-Joon L. <lee...@gm...> - 2012-01-03 02:57:53
|
I just opened a pull request that implements the requested feature. https://github.com/matplotlib/matplotlib/pull/655 If you're familiar with Git, please test it and see if it works for your need. I believe I will merge this PR to the master branch in a few days unless there is any objection. Regards, -JJ On Tue, Dec 20, 2011 at 6:21 AM, Jonathan Slavin <js...@cf...> wrote: > Hi, > > It seems that patheffects are not supported for Line2D objects currently > - only for Text and Patch objects. Is there any fundamental reason they > couldn't be extended to support Line2D objects? I'm interested in this > because I draw grid lines for some hammer projection plots and those > lines are Line2D objects. For certain images, it'd be nicer to have the > grid lines use patheffects so that any color of the image would still > allow the grid line to show clearly. > > Jon > -- > ______________________________________________________________ > Jonathan D. Slavin Harvard-Smithsonian CfA > js...@cf... 60 Garden Street, MS 83 > phone: (617) 496-7981 Cambridge, MA 02138-1516 > cell: (781) 363-0035 USA > ______________________________________________________________ > > > ------------------------------------------------------------------------------ > Write once. Port to many. > Get the SDK and tools to simplify cross-platform app development. Create > new or port existing apps to sell to consumers worldwide. Explore the > Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join > http://p.sf.net/sfu/intel-appdev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
|
From: Eric F. <ef...@ha...> - 2012-01-02 20:40:29
|
On 01/02/2012 08:36 AM, Chao YUE wrote:
> Dear all,
>
> I want to draw a contourf with the data covering N>45 (high latitude)
> using a 'npstere' projection.
>
> The problem is if I draw continents with a gray color,
> (m.fillcontinents(color='0.5'))
> the contourf lay which comes later will be below the continents and
> completely invisible.
> Does anyone else have this and any suggestions?
I think you will be able to solve this problem be setting the zorder of
each patch collection in the object returned by the call to contourf,
something like this:
CS = contourf(Z)
for col in CS.collections:
col.set_zorder(2.5)
The default zorder for solids is 2, so I expect that is what the filled
continents are; boosting the patch collections to 2.5 should ensure they
are above the continents.
Eric
>
> thanks,
>
> Chao
> --
> ***********************************************************************************
> Chao YUE
> Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL)
> UMR 1572 CEA-CNRS-UVSQ
> Batiment 712 - Pe 119
> 91191 GIF Sur YVETTE Cedex
> Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16
> ************************************************************************************
>
|
|
From: Álvaro J. [T. <alv...@gm...> - 2012-01-02 18:49:44
|
Done! https://github.com/matplotlib/matplotlib/issues/654 Thanks for the support. On Mon, Jan 2, 2012 at 16:28, Benjamin Root <ben...@ou...> wrote: > On Mon, Jan 2, 2012 at 11:25 AM, Álvaro Justen [Turicas] > <alv...@gm...> wrote: >> >> Hello, >> When I use Figure.autofmt_xdate (it uses rotation by default) the >> graph is not moved/scaled so it is cropped in the image. >> I noticed this problem when I was trying to crop white border in >> images using bbox_inches='tight' and pad_inches=0 in Figure.savefig. >> There are attached: >> * Simple code to reproduce the bug >> * Output images of two cases (with and without bbox_inches + pad_inches) >> >> My system's info: >> - uname -a: Linux E04679 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 >> 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux >> - matplotlib version: 0.99.3, installed using pip >> - Nothing in matplotlibrc >> - Nothing special in verbose options >> >> Thanks, >> -- >> Álvaro Justen "Turicas" > > > Turicas, > > Confirmed with the v1.1.x branch. Could you file a bug report on github? > > Thanks! > Ben Root > -- Álvaro Justen "Turicas" http://blog.justen.eng.br http://twitter.com/turicas http://CursoDeArduino.com.br http://github.com/turicas +55 21 9898-0141 |
|
From: Chao Y. <cha...@gm...> - 2012-01-02 18:36:19
|
Dear all, I want to draw a contourf with the data covering N>45 (high latitude) using a 'npstere' projection. The problem is if I draw continents with a gray color, (m.fillcontinents(color='0.5')) the contourf lay which comes later will be below the continents and completely invisible. Does anyone else have this and any suggestions? thanks, Chao -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
|
From: Chao Y. <cha...@gm...> - 2012-01-02 18:33:20
|
Thanks Ben. cheers, Chao 2012/1/2 Benjamin Root <ben...@ou...> > On Mon, Jan 2, 2012 at 11:10 AM, Chao YUE <cha...@gm...> wrote: > >> Dear all matplotlib users, >> >> Happy New Year. >> I try to check the distribution of a 2D array and I find that the >> histogram plot function doesn't respect the numpy masked array? >> >> >> In [188]: a=range(1,6); b=np.array(a+a[::-1]) >> >> In [189]: b=np.ma.masked_equal(b,2); b=np.ma.masked_equal(b,5) >> >> In [190]: b >> Out[190]: >> masked_array(data = [1 -- 3 4 -- -- 4 3 -- 1], >> mask = [False True False False True True False False >> True False], >> fill_value = 5) >> >> >> In [191]: n,bins,patches=plt.hist(b) >> >> In [192]: n >> Out[192]: array([2, 0, 2, 0, 0, 2, 0, 2, 0, 2]) >> >> In [193]: n.sum() >> Out[193]: 10 >> >> it seems that all the elements (masked or not) are counted in the history >> plotting? >> and the original value is used but not the fill_value? >> >> I attach a figure below. >> >> In [194]: plt.show() >> >> > Yes, this is a known issue (at least, from the comments within the > function). Looks like hist() uses np.asarray() instead of np.asanyarray(), > which would result in the array being stripped of its mask. However, I > don't think the fix is as straight-forward as changing that to > np.asanyarray(). I will take a peek and see what can be done. > > Ben Root > > -- *********************************************************************************** Chao YUE Laboratoire des Sciences du Climat et de l'Environnement (LSCE-IPSL) UMR 1572 CEA-CNRS-UVSQ Batiment 712 - Pe 119 91191 GIF Sur YVETTE Cedex Tel: (33) 01 69 08 29 02; Fax:01.69.08.77.16 ************************************************************************************ |
|
From: Benjamin R. <ben...@ou...> - 2012-01-02 18:28:55
|
On Mon, Jan 2, 2012 at 11:25 AM, Álvaro Justen [Turicas] < alv...@gm...> wrote: > Hello, > When I use Figure.autofmt_xdate (it uses rotation by default) the > graph is not moved/scaled so it is cropped in the image. > I noticed this problem when I was trying to crop white border in > images using bbox_inches='tight' and pad_inches=0 in Figure.savefig. > There are attached: > * Simple code to reproduce the bug > * Output images of two cases (with and without bbox_inches + pad_inches) > > My system's info: > - uname -a: Linux E04679 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 > 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux > - matplotlib version: 0.99.3, installed using pip > - Nothing in matplotlibrc > - Nothing special in verbose options > > Thanks, > -- > Álvaro Justen "Turicas" > Turicas, Confirmed with the v1.1.x branch. Could you file a bug report on github? Thanks! Ben Root |
|
From: Benjamin R. <ben...@ou...> - 2012-01-02 18:13:40
|
On Mon, Jan 2, 2012 at 11:10 AM, Chao YUE <cha...@gm...> wrote: > Dear all matplotlib users, > > Happy New Year. > I try to check the distribution of a 2D array and I find that the > histogram plot function doesn't respect the numpy masked array? > > > In [188]: a=range(1,6); b=np.array(a+a[::-1]) > > In [189]: b=np.ma.masked_equal(b,2); b=np.ma.masked_equal(b,5) > > In [190]: b > Out[190]: > masked_array(data = [1 -- 3 4 -- -- 4 3 -- 1], > mask = [False True False False True True False False True > False], > fill_value = 5) > > > In [191]: n,bins,patches=plt.hist(b) > > In [192]: n > Out[192]: array([2, 0, 2, 0, 0, 2, 0, 2, 0, 2]) > > In [193]: n.sum() > Out[193]: 10 > > it seems that all the elements (masked or not) are counted in the history > plotting? > and the original value is used but not the fill_value? > > I attach a figure below. > > In [194]: plt.show() > > Yes, this is a known issue (at least, from the comments within the function). Looks like hist() uses np.asarray() instead of np.asanyarray(), which would result in the array being stripped of its mask. However, I don't think the fix is as straight-forward as changing that to np.asanyarray(). I will take a peek and see what can be done. Ben Root |
|
From: Álvaro J. [T. <alv...@gm...> - 2012-01-02 17:25:44
|
Hello, When I use Figure.autofmt_xdate (it uses rotation by default) the graph is not moved/scaled so it is cropped in the image. I noticed this problem when I was trying to crop white border in images using bbox_inches='tight' and pad_inches=0 in Figure.savefig. There are attached: * Simple code to reproduce the bug * Output images of two cases (with and without bbox_inches + pad_inches) My system's info: - uname -a: Linux E04679 2.6.38-13-generic #53-Ubuntu SMP Mon Nov 28 19:33:45 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux - matplotlib version: 0.99.3, installed using pip - Nothing in matplotlibrc - Nothing special in verbose options Thanks, -- Álvaro Justen "Turicas" http://blog.justen.eng.br http://twitter.com/turicas http://CursoDeArduino.com.br http://github.com/turicas +55 21 9898-0141 |
|
From: Tony Yu <ts...@gm...> - 2012-01-02 15:21:41
|
On Mon, Jan 2, 2012 at 6:01 AM, Virgil Stokes <vs...@it...> wrote: > The following link should link you to a very interesting graphical display, > > > http://www.ecb.int/stats/exchange/eurofxref/html/eurofxref-graph-nok.en.html > > This type of graphical output (or at least something quite similar) can be > found > in other web pages that display financial data. > > Has anyone been able to produce a similar interactive graphical display > using > Matplotlib? A challenge for 2012 :-) > > --V > This shouldn't be too difficult. If you take a look at the event handling examples<http://matplotlib.sourceforge.net/examples/event_handling/index.html>there are some good starting points. For example, the data browser example<http://matplotlib.sourceforge.net/examples/event_handling/data_browser.html>does something similar, except you click to select data (you can change this by hooking into 'motion_notify_event' instead of 'pick_event'). The one difficult part might be displaying your data-point info. Its easy enough to just print out description to a terminal, but I'm not sure how easy it is to display a tooltip. This SO question<http://stackoverflow.com/questions/7908636/possible-to-make-labels-appear-when-hovering-over-a-point-in-matplotlib>may help with that. Best, -Tony |
|
From: Alexander H. <mat...@2s...> - 2012-01-02 14:04:41
|
very similar: http://www.google.com/finance?hl=en&q=CURRENCY:AUDUSD On 01/02/2012 05:01 AM, Virgil Stokes wrote: > The following link should link you to a very interesting graphical display, > > http://www.ecb.int/stats/exchange/eurofxref/html/eurofxref-graph-nok.en.html > > This type of graphical output (or at least something quite similar) can be found > in other web pages that display financial data. > > Has anyone been able to produce a similar interactive graphical display using > Matplotlib? A challenge for 2012 :-) > > --V > > ------------------------------------------------------------------------------ > Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex > infrastructure or vast IT resources to deliver seamless, secure access to > virtual desktops. With this all-in-one solution, easily deploy virtual > desktops for less than the cost of PCs and save 60% on VDI infrastructure > costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Logi R. <lo...@be...> - 2012-01-02 11:55:31
|
Eric Firing wrote: > > On Wed, Dec 28, 2011 at 1:11 AM, Jeff Whitaker <js...@fa...> wrote: >> >> On 12/27/11 12:07 PM, Logi Ragnarsson wrote: >> >>> Is it supposed to be possible to do a filled contour plot with alpha levels in the colour map? I'm plotting weather data on top of maps and would very much like to plot low levels of wind and precipitation as mostly transparent, with higher levels more opaque. >>> >> Logi: It looks like alpha transparency is controlled with the alpha keyword, so you can't specify different alphas for each contour level. You may have to call contourf multiple times, changing the alpha as needed for each set of contour levels. >> >> -Jeff > > It looks like this is something I can fix by modifying ListedColormap. It is discarding the alpha values, and I don't think there is any reason it needs to do so. > > Eric I feel that this would be a worth-while improvement to the library. In the mean-time, I have realized that the source is all there for me to read, and I can probably create my own patched version of ListedColormap. Actually, I've been interpolating colours to feed to contourf, but it would be much more sensible to use a LinearSegmentedColormap for this. Unfortunately it also discards alpha levels. Regards, Logi PS I was getting digests of the list, so I couldn't properly respond to Eric's mail, in case the headers look funny. |
|
From: Virgil S. <vs...@it...> - 2012-01-02 11:27:02
|
The following link should link you to a very interesting graphical display, http://www.ecb.int/stats/exchange/eurofxref/html/eurofxref-graph-nok.en.html This type of graphical output (or at least something quite similar) can be found in other web pages that display financial data. Has anyone been able to produce a similar interactive graphical display using Matplotlib? A challenge for 2012 :-) --V |
|
From: Eric F. <ef...@ha...> - 2012-01-02 07:54:58
|
On 12/30/2011 01:57 PM, Paul Ivanov wrote: > Eric Firing, on 2011-12-27 15:31, wrote: >> It looks like this is something I can fix by modifying ListedColormap. >> It is discarding the alpha values, and I don't think there is any reason >> it needs to do so. > > One of my first attempts at a contribution to matplotlib three > years ago was related to this. It was in reply to a similar > question on list, and I wrote a patch, but never saw it through > to inclusion because it wasn't something I needed. > > http://www.mail-archive.com/mat...@li.../msg09216.html > > I think it's a helpful starting point, as I include a discussion > on the limitation of mpl colormaps there. Thank you. I think that some of the sorts of changes you had in your patch have actually been made in the interim. I now have a branch with a few small changes that I think may be all that is necessary for full support of variable alpha in colormaps. I will turn it into a pull request shortly, after a bit more testing and inclusion of an example, assuming I don't run into a major problem along the way. Eric |