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
(14) |
2
(3) |
3
|
4
|
5
|
6
(6) |
7
(8) |
8
(5) |
9
|
10
|
11
|
12
(7) |
13
(1) |
14
|
15
(2) |
16
(5) |
17
(8) |
18
|
19
(1) |
20
(2) |
21
(3) |
22
(1) |
23
(3) |
24
(1) |
25
|
26
|
27
|
28
|
29
(5) |
30
(3) |
31
|
From: Eric F. <ef...@ha...> - 2014-05-17 03:39:29
|
On 2014/05/16 4:41 PM, Michael Goerz wrote: > Hi, > > While playing around for an afternoon with colors in matplotlib, I came > across some inconsistencies. I was trying to define colors in sRGB (my > understanding is that sRGB as a standardized color space is > device-independent). Giving RGB values to matplotlib, I checked the > output with a color picker -- Color Maker from the Mac App Store, set > to the sRGB mode, but the built-in DigitalColor Meter gives the same > result. It turns out that the colors I see in the output are not what I > specified. This makes playing around with colors, a bit difficult: > http://nbviewer.ipython.org/gist/goerz/9aab94f5322d5a457625 > As far as I can tell, Matplotlib does not specify in > which color model in interprets RGB values (this should ideally be > stated in the documentation). Also, the output in different backends > (IPython notebook, and interactive GUI) gave different results. As a > minimal example, consider the following: Matplotlib doesn't interpret RGB values; that is left to the display device. Matplotlib simply writes the RGB values in a file, unmodified, or sends them via a GUI backend to a display, also unmodified *by mpl*. What you put in, is what it puts out. Thanks for pointing out the DigitalColor Meter--I hadn't noticed it. What I see with your example is that the MacOSX backend *display* is interpreting RGB as sRGB, and the qt4agg backend *display* is interpreting RGB as native values (based on matching with DigitalColor Meter). I haven't tried this with inline plots in the notebook, but mpl is merely feeding RGB values to the browser, just as would occur when displaying a png, and it is up to the browser to decide how to convert them into pixel intensity. I don't see that there is a bug here. Eric > > import pylab > import numpy as np > import matplotlib > #%matplotlib inline > # draw line with sRGB color 228, 26, 28 > pylab.plot(np.linspace(0,10, 10), np.linspace(0,20,10), linewidth=10, > color=(0.894, 0.102, 0.110)) > pylab.show() > # Colorpicker shows 210, 46, 13 in GUI view > # Colorpicker shows 229, 39, 27 in iPython Notebook > > In the IPython notebook, direct PIL graphics do seem to give the right > colors cf. In [5] in the linked IPython notebook (even though PIL also > does not explicitly specify its color model). Just matplotlib seems > off. Of course, I'm doing some slightly crazy stuff in the Notebook, > displaying every matplotlib output through PIL, but I cecked that > `%matplotlib inline` actually produces the same colors. > > Should I file this on github as a bug report? > > Best, > Michael > > P.S.: please CC for direct replies > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Michael G. <go...@ph...> - 2014-05-17 02:42:59
|
Hi, While playing around for an afternoon with colors in matplotlib, I came across some inconsistencies. I was trying to define colors in sRGB (my understanding is that sRGB as a standardized color space is device-independent). Giving RGB values to matplotlib, I checked the output with a color picker -- Color Maker from the Mac App Store, set to the sRGB mode, but the built-in DigitalColor Meter gives the same result. It turns out that the colors I see in the output are not what I specified. This makes playing around with colors, a bit difficult: http://nbviewer.ipython.org/gist/goerz/9aab94f5322d5a457625 As far as I can tell, Matplotlib does not specify in which color model in interprets RGB values (this should ideally be stated in the documentation). Also, the output in different backends (IPython notebook, and interactive GUI) gave different results. As a minimal example, consider the following: import pylab import numpy as np import matplotlib #%matplotlib inline # draw line with sRGB color 228, 26, 28 pylab.plot(np.linspace(0,10, 10), np.linspace(0,20,10), linewidth=10, color=(0.894, 0.102, 0.110)) pylab.show() # Colorpicker shows 210, 46, 13 in GUI view # Colorpicker shows 229, 39, 27 in iPython Notebook In the IPython notebook, direct PIL graphics do seem to give the right colors cf. In [5] in the linked IPython notebook (even though PIL also does not explicitly specify its color model). Just matplotlib seems off. Of course, I'm doing some slightly crazy stuff in the Notebook, displaying every matplotlib output through PIL, but I cecked that `%matplotlib inline` actually produces the same colors. Should I file this on github as a bug report? Best, Michael P.S.: please CC for direct replies |
From: 不坏阿峰 <onl...@gm...> - 2014-05-16 15:24:03
|
very nice and thanks a lot , you are very nice. and could you give me some guide how to put this in qlabel of pyqt ? or what's widget is better to work with these code 2014-05-16 21:25 GMT+07:00 Joe Kington <jof...@gm...>: > > > > On Fri, May 16, 2014 at 7:36 AM, Alan G Isaac <ala...@gm...>wrote: > >> On 5/16/2014 7:51 AM, 不坏阿峰 wrote: >> > how to use matplotlib to drew chart like this ? >> > http://www.advsofteng.com/doc/cdpydoc/images/concentric.png >> >> >> Not an answer to your question: >> http://www.businessinsider.com/pie-charts-are-the-worst-2013-6 >> >> fwiw, >> Alan Isaac >> > > Alan is quite right. However, that aside, here's how you'd do it in > matplotlib: > > import matplotlib.pyplot as plt > > fig, ax = plt.subplots() > ax.axis('equal') > > # Width of the "rings" (percentages if the largest "radius"==1) > width = 0.35 > > # Note the different "radius" values: largest --> outside "donut". > kwargs = dict(colors=['#66FF66', '#9999FF', '#FF9999'], startangle=90) > inside, _ = ax.pie([45, 87, 77], radius=1-width, **kwargs) > outside, _ = ax.pie([96, 124, 88], radius=1, **kwargs) > > # This is the key. We'll set the "width" for all wedges generated by > ax.pie. > # (The inside radius for each donut will be "radius" - "width") > plt.setp(inside + outside, width=width, edgecolor='white') > > ax.legend(inside[::-1], ['Hardware', 'Software', 'Services'], > frameon=False) > > plt.show() > > > > If you wanted to replicate the example figure more closely, you'll need to > get a touch fancier: > > import matplotlib.pyplot as plt > import numpy as np > > def pie(ax, values, **kwargs): > total = sum(values) > def formatter(pct): > return '${:0.0f}M\n({:0.1f}%)'.format(pct*total/100, pct) > wedges, _, labels = ax.pie(values, autopct=formatter, **kwargs) > return wedges > > fig, ax = plt.subplots() > ax.axis('equal') > > width = 0.35 > kwargs = dict(colors=['#66FF66', '#9999FF', '#FF9999'], startangle=90) > > outside = pie(ax, [96, 124, 88], radius=1, pctdistance=1-width/2, **kwargs) > inside = pie(ax, [45, 87, 77], radius=1-width, > pctdistance=1 - (width/2) / (1-width), **kwargs) > plt.setp(inside + outside, width=width, edgecolor='white') > > ax.legend(inside[::-1], ['Hardware', 'Software', 'Services'], > frameon=False) > > kwargs = dict(size=13, color='white', va='center', fontweight='bold') > ax.text(0, 0, 'Year 2005', ha='center', > bbox=dict(boxstyle='round', facecolor='blue', edgecolor='none'), > **kwargs) > ax.annotate('Year 2006', (0, 0), xytext=(np.radians(-45), 1.1), > bbox=dict(boxstyle='round', facecolor='green', > edgecolor='none'), > textcoords='polar', ha='left', **kwargs) > > plt.show() > > > > Hope those examples give you some ideas! > Cheers, > -Joe > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Joe K. <jof...@gm...> - 2014-05-16 14:25:35
|
On Fri, May 16, 2014 at 7:36 AM, Alan G Isaac <ala...@gm...> wrote: > On 5/16/2014 7:51 AM, 不坏阿峰 wrote: > > how to use matplotlib to drew chart like this ? > > http://www.advsofteng.com/doc/cdpydoc/images/concentric.png > > > Not an answer to your question: > http://www.businessinsider.com/pie-charts-are-the-worst-2013-6 > > fwiw, > Alan Isaac > Alan is quite right. However, that aside, here's how you'd do it in matplotlib: import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.axis('equal') # Width of the "rings" (percentages if the largest "radius"==1) width = 0.35 # Note the different "radius" values: largest --> outside "donut". kwargs = dict(colors=['#66FF66', '#9999FF', '#FF9999'], startangle=90) inside, _ = ax.pie([45, 87, 77], radius=1-width, **kwargs) outside, _ = ax.pie([96, 124, 88], radius=1, **kwargs) # This is the key. We'll set the "width" for all wedges generated by ax.pie. # (The inside radius for each donut will be "radius" - "width") plt.setp(inside + outside, width=width, edgecolor='white') ax.legend(inside[::-1], ['Hardware', 'Software', 'Services'], frameon=False) plt.show() If you wanted to replicate the example figure more closely, you'll need to get a touch fancier: import matplotlib.pyplot as plt import numpy as np def pie(ax, values, **kwargs): total = sum(values) def formatter(pct): return '${:0.0f}M\n({:0.1f}%)'.format(pct*total/100, pct) wedges, _, labels = ax.pie(values, autopct=formatter, **kwargs) return wedges fig, ax = plt.subplots() ax.axis('equal') width = 0.35 kwargs = dict(colors=['#66FF66', '#9999FF', '#FF9999'], startangle=90) outside = pie(ax, [96, 124, 88], radius=1, pctdistance=1-width/2, **kwargs) inside = pie(ax, [45, 87, 77], radius=1-width, pctdistance=1 - (width/2) / (1-width), **kwargs) plt.setp(inside + outside, width=width, edgecolor='white') ax.legend(inside[::-1], ['Hardware', 'Software', 'Services'], frameon=False) kwargs = dict(size=13, color='white', va='center', fontweight='bold') ax.text(0, 0, 'Year 2005', ha='center', bbox=dict(boxstyle='round', facecolor='blue', edgecolor='none'), **kwargs) ax.annotate('Year 2006', (0, 0), xytext=(np.radians(-45), 1.1), bbox=dict(boxstyle='round', facecolor='green', edgecolor='none'), textcoords='polar', ha='left', **kwargs) plt.show() Hope those examples give you some ideas! Cheers, -Joe |
From: Alan G I. <ala...@gm...> - 2014-05-16 12:36:26
|
On 5/16/2014 7:51 AM, 不坏阿峰 wrote: > how to use matplotlib to drew chart like this ? > http://www.advsofteng.com/doc/cdpydoc/images/concentric.png Not an answer to your question: http://www.businessinsider.com/pie-charts-are-the-worst-2013-6 fwiw, Alan Isaac |
From: Paul T. <pau...@gm...> - 2014-05-16 12:16:11
|
Thanks. New issue submitted. In my humble opinion, the creation of a home configuration directory should be optional, only implemented by an option from the command line. Otherwise, a small detail like creating a directory can cause major headaches. On Thu, May 15, 2014 at 4:43 PM, Paul Ivanov <pi...@be...> wrote: > Hi Paul and Paul, > > I thought I'd pile onto this Paul Pile... > > Paul Tremblay, on 2014-05-15 16:33, wrote: > > However, this really is a bug. I have spent about two hours trying to get > > this to work on EC. > > > > Where to I file bugs? > > https://github.com/matplotlib/matplotlib/issues > > Here's a recent issue which may be related to yours, > https://github.com/matplotlib/matplotlib/issues/3062 > > but if that doesn't capture the problem you are seeing, and you > don't find an issue open for the behavior you're seeing, please > open a new one. > > best, > -- > _ > / \ > A* \^ - > ,./ _.`\\ / \ > / ,--.S \/ \ > / `"~,_ \ \ > __o ? > _ \<,_ /:\ > --(_)/-(_)----.../ | \ > --------------.......J > Paul Ivanov > http://pirsquared.org > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: 不坏阿峰 <onl...@gm...> - 2014-05-16 11:51:27
|
Dear all how to use matplotlib to drew chart like this ? http://www.advsofteng.com/doc/cdpydoc/images/concentric.png |
From: Paul I. <pi...@be...> - 2014-05-15 20:43:54
|
Hi Paul and Paul, I thought I'd pile onto this Paul Pile... Paul Tremblay, on 2014-05-15 16:33, wrote: > However, this really is a bug. I have spent about two hours trying to get > this to work on EC. > > Where to I file bugs? https://github.com/matplotlib/matplotlib/issues Here's a recent issue which may be related to yours, https://github.com/matplotlib/matplotlib/issues/3062 but if that doesn't capture the problem you are seeing, and you don't find an issue open for the behavior you're seeing, please open a new one. best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov http://pirsquared.org |
From: Paul T. <pau...@gm...> - 2014-05-15 20:33:27
|
However, this really is a bug. I have spent about two hours trying to get this to work on EC. Where to I file bugs? P. On Wed, May 7, 2014 at 1:29 PM, Paul Tremblay <pau...@gm...>wrote: > I've discovered the problem and a fix. $HOME is set to /home/ptremblay, > but /home/ptremblay does not exist. If I do: > > import os > try: > import matplotlib > except AttributeError as msg: > os.environ['HOME'] = '/apollo/env/Ssdf/var/home_config/' > import matplotlib > > Then I can import the library. > > > On Wed, May 7, 2014 at 11:50 AM, Paul Tremblay <pau...@gm...>wrote: > >> I am using our companies pacaking system. The version of matplotlib is >> 1.3.1, by the way. >> >> >> On Wed, May 7, 2014 at 11:32 AM, Paul Hobson <pmh...@gm...> wrote: >> >>> How did you install matplotlib? I've had success using anaconda on cheap >>> $7/month web servers before >>> http://continuum.io/downloads >>> >>> >>> On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay <pau...@gm...>wrote: >>> >>>> I am using matplotllib as part of web server. matplotlib causes my >>>> server to crash with this error: >>>> >>>> File >>>> "/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/__init__.py", line >>>> 597, in _get_configdir >>>> return _get_config_or_cache_dir(_get_xdg_config_dir()) >>>> File >>>> "/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/__init__.py", line >>>> 534, in _get_xdg_config_dir >>>> return os.environ.get('XDG_CONFIG_HOME', os.path.join(get_home(), >>>> '.config')) >>>> File >>>> "/apollo/env/Ssdf/bin/../../../package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py", >>>> line 77, in join >>>> elif path == '' or path.endswith('/'): >>>> <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute >>>> 'endswith' >>>> >>>> I have no home directory on my server (and probably don't have the >>>> permissions to create one). What is the correct way to fix this problem? >>>> >>>> Thanks! >>>> >>>> Paul >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Is your legacy SCM system holding you back? Join Perforce May 7 to find >>>> out: >>>> • 3 signs your SCM is hindering your productivity >>>> • Requirements for releasing software faster >>>> • Expert tips and advice for migrating your SCM now >>>> http://p.sf.net/sfu/perforce >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>>> >>> >> > |
From: Maik R. <mai...@ar...> - 2014-05-13 07:55:30
|
Hi Phil, > Not entirely sure what you're after (a picture may have helped), but I > know Basemap has relatively recently added rotated pole coordinate > system support which may be of use. I'm not sure how well that goes > with the meridian/parallel drawing within Basemap though. Indeed, a picture is always better! And in fact I forgot to mention how the prime meridian is defined. http://wdc.kugi.kyoto-u.ac.jp/igrf/gggm/gmexp.html In summary: 1. The north pole in the geomagnetic coordinate system is the geomagnetic north pole (and the same with the south pole). 2. The prime meridian passes through the geographic and geomagnetic poles. I think basemap's rotated pole system is not applicable here. If I understood correctly then the data is just represented in rotated pole coordinates (I guess to avoid having data that goes through the discontinuity or the poles) but for the actual drawing they are transformed back to geographic coordinates and everything happens like usual. > Alternatively, if I've understood you correctly, I've put together an > example using cartopy which first produces a map in "Geomagnetic" > space (with traditional latitude and longitude meridians/parallels) > and then by drawing a north polar stereographic map first with the > geomagnetic latitudes and longitudes (for 2010) next to the WGS84 > latitudes and longitudes. > > Notebook can be found > http://nbviewer.ipython.org/gist/pelson/7b461a798e454533d4ef > > The key is that you can make a map of any projection, and later add > data from any source coordinate system (transform) and they should > play nicely in Cartopy. I think this should work and I like the way this is done in Cartopy (haven't used it yet). How would I define the prime meridian here? Cheers Maik > > Is this the kind of thing you're after? > > Cheers, > > Phil > > > > On 12 May 2014 13:18, Maik Riechert <mai...@ar... > <mailto:mai...@ar...>> wrote: > > Hi, > > I'm drawing a stereographic map, my data is in geographic latitude, > longitude coordinates. But instead of drawing parallels/meridians > based > on the geographic poles I need to draw them based on the geomagnetic > poles, that is, the poles are rotated. E.g. in 2010 the north > geomagnetic pole was at 80.08°N 72.21°W > (https://en.wikipedia.org/wiki/Geomagnetic_pole). In my case it's for > aurora research, and many existing maps are drawn in this way, so > naturally it becomes easier to compare them if they are based on the > same coordinate system. > > Is this somehow achievable with basemap? Note that I'd like to draw > country borders etc. as well. (Otherwise I could just transform my > geographic coordinates to magnetic coordinates and use standard > basemap.) > > Thanks > Maik > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing > platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Asma R. <asm...@gm...> - 2014-05-12 17:08:56
|
Hi, I have generated a heat map along side a tree with gridspec. The issue is that I want the tree with smaller dimensions and heat map should be in a square dimension, adjusting height ratios and width ration only helps reduce tree and the heat map dimensions increase. Here is my code: gs=gridspec.GridSpec(1, 2,height_ratios=[1,1,-2,2] ,width_ratios=[0.5,1,-2,2],hspace=0,wspace=0) phyl_ax=plt.subplot(gs[0,0]) Phylo.draw(tree, axes=phyl_ax, do_show=False,show_confidence=False) ht_ax=plt.subplot(gs[0,1]) Hence I decided to use add_subplots instead: from mpl_toolkits.axes_grid1 import make_axes_locatable,Size from Bio import Phylo fig= plt.figure() phyl_ax=fig.add_subplot(1,2,1) ht_ax=fig.add_subplot(1,2,2) fig.subplots_adjust(hspace=0,wspace=0) divider1 = make_axes_locatable(phyl_ax) divider1.get_horizontal()[0] = Size.Fixed(5.0) # 10 inch divider1.get_vertical()[0] = Size.Fixed(10.0) # 4 inch Phylo.draw(tree, axes=phyl_ax, do_show=False,show_confidence=False) divider2 = make_axes_locatable(ht_ax) divider2.get_horizontal()[0] = Size.Fixed(10.0) # 5 inch divider2.get_vertical()[0] = Size.Fixed(10.0) # 5 inch divider = make_axes_locatable(ht_ax) cbax = divider.append_axes("right", size="5%", pad=0.10) Note:The width of the subplots is what I am trying to make different and height should be the same. With the above code the tree subplot is appearing in the background and heat map on top of it, rather than adjacent. Could anyone help me out with this? Thanks Asma |
From: Phil E. <pel...@gm...> - 2014-05-12 16:29:00
|
Hi Maik, Not entirely sure what you're after (a picture may have helped), but I know Basemap has relatively recently added rotated pole coordinate system support which may be of use. I'm not sure how well that goes with the meridian/parallel drawing within Basemap though. Alternatively, if I've understood you correctly, I've put together an example using cartopy which first produces a map in "Geomagnetic" space (with traditional latitude and longitude meridians/parallels) and then by drawing a north polar stereographic map first with the geomagnetic latitudes and longitudes (for 2010) next to the WGS84 latitudes and longitudes. Notebook can be found http://nbviewer.ipython.org/gist/pelson/7b461a798e454533d4ef The key is that you can make a map of any projection, and later add data from any source coordinate system (transform) and they should play nicely in Cartopy. Is this the kind of thing you're after? Cheers, Phil On 12 May 2014 13:18, Maik Riechert <mai...@ar...> wrote: > Hi, > > I'm drawing a stereographic map, my data is in geographic latitude, > longitude coordinates. But instead of drawing parallels/meridians based > on the geographic poles I need to draw them based on the geomagnetic > poles, that is, the poles are rotated. E.g. in 2010 the north > geomagnetic pole was at 80.08°N 72.21°W > (https://en.wikipedia.org/wiki/Geomagnetic_pole). In my case it's for > aurora research, and many existing maps are drawn in this way, so > naturally it becomes easier to compare them if they are based on the > same coordinate system. > > Is this somehow achievable with basemap? Note that I'd like to draw > country borders etc. as well. (Otherwise I could just transform my > geographic coordinates to magnetic coordinates and use standard basemap.) > > Thanks > Maik > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Thøger Rivera-T. <tho...@gm...> - 2014-05-12 15:17:06
|
I usually get around this by writing my plotting routines as functions that take Axes objects as input. That way, they don't need to know about the layout of the figure, and I can use the same code for figures with one or more axes. I am working on a project involving a sample of galaxies, and sometimes I need a plot parameter A for one of the galaxies only, in a figure together with plots of parameters B and C for the same galaxy. Other times, I need a figure with plots of parameter A only, but with an Axes for each galaxy in the sample. This approach allows me to use the same code for both cases. /Emil On 2014-05-12 17:06, Yuxiang Wang wrote: > Hi Eric, > > Thank you for your very clear explanation. > > -Shawn > > On Mon, May 12, 2014 at 3:23 AM, Eric Firing <ef...@ha...> wrote: >> On 2014/05/11 7:56 PM, Yuxiang Wang wrote: >>> Dear all, >>> >>> I am curious that whether this is possible in matplotlib: >>> >>> I first create some figures, with subplots. >>> >>> import matplotlib.pyplot as plt >>> fig1, axs1 = plt.subplots(2, 2) >>> fig2, axs2 = plt.subplots(2, 2) >>> >>> And then, could I recombine them, so fig3 is composed of the first row >>> in fig1 (i.e., axs1[0, 0] and axs1[0, 1]) and second row in fig2 >>> (i.e., axs2[1, 0] and axs2[1, 1])? >>> >>> Currently, all I could do is to re-plot them. I am curious about >>> whether there is a way that I can just move axes around and re-combine >>> them to make new figures. Thanks! >> No, there is no facility for doing this. The Axes class is always >> initialized with a Figure instance. The Axes and Figure are quite >> tightly tied together via transforms. >> >> Eric >> >>> -Shawn >>> >>> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Yuxiang W. <yw...@vi...> - 2014-05-12 15:07:03
|
Hi Eric, Thank you for your very clear explanation. -Shawn On Mon, May 12, 2014 at 3:23 AM, Eric Firing <ef...@ha...> wrote: > On 2014/05/11 7:56 PM, Yuxiang Wang wrote: >> Dear all, >> >> I am curious that whether this is possible in matplotlib: >> >> I first create some figures, with subplots. >> >> import matplotlib.pyplot as plt >> fig1, axs1 = plt.subplots(2, 2) >> fig2, axs2 = plt.subplots(2, 2) >> >> And then, could I recombine them, so fig3 is composed of the first row >> in fig1 (i.e., axs1[0, 0] and axs1[0, 1]) and second row in fig2 >> (i.e., axs2[1, 0] and axs2[1, 1])? >> >> Currently, all I could do is to re-plot them. I am curious about >> whether there is a way that I can just move axes around and re-combine >> them to make new figures. Thanks! > > No, there is no facility for doing this. The Axes class is always > initialized with a Figure instance. The Axes and Figure are quite > tightly tied together via transforms. > > Eric > >> >> -Shawn >> >> > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Yuxiang "Shawn" Wang Gerling Research Lab University of Virginia yw...@vi... +1 (434) 284-0836 https://sites.google.com/a/virginia.edu/yw5aj/ |
From: Maik R. <mai...@ar...> - 2014-05-12 12:18:22
|
Hi, I'm drawing a stereographic map, my data is in geographic latitude, longitude coordinates. But instead of drawing parallels/meridians based on the geographic poles I need to draw them based on the geomagnetic poles, that is, the poles are rotated. E.g. in 2010 the north geomagnetic pole was at 80.08°N 72.21°W (https://en.wikipedia.org/wiki/Geomagnetic_pole). In my case it's for aurora research, and many existing maps are drawn in this way, so naturally it becomes easier to compare them if they are based on the same coordinate system. Is this somehow achievable with basemap? Note that I'd like to draw country borders etc. as well. (Otherwise I could just transform my geographic coordinates to magnetic coordinates and use standard basemap.) Thanks Maik |
From: Eric F. <ef...@ha...> - 2014-05-12 07:23:25
|
On 2014/05/11 7:56 PM, Yuxiang Wang wrote: > Dear all, > > I am curious that whether this is possible in matplotlib: > > I first create some figures, with subplots. > > import matplotlib.pyplot as plt > fig1, axs1 = plt.subplots(2, 2) > fig2, axs2 = plt.subplots(2, 2) > > And then, could I recombine them, so fig3 is composed of the first row > in fig1 (i.e., axs1[0, 0] and axs1[0, 1]) and second row in fig2 > (i.e., axs2[1, 0] and axs2[1, 1])? > > Currently, all I could do is to re-plot them. I am curious about > whether there is a way that I can just move axes around and re-combine > them to make new figures. Thanks! No, there is no facility for doing this. The Axes class is always initialized with a Figure instance. The Axes and Figure are quite tightly tied together via transforms. Eric > > -Shawn > > |
From: Yuxiang W. <yw...@vi...> - 2014-05-12 05:56:37
|
Dear all, I am curious that whether this is possible in matplotlib: I first create some figures, with subplots. import matplotlib.pyplot as plt fig1, axs1 = plt.subplots(2, 2) fig2, axs2 = plt.subplots(2, 2) And then, could I recombine them, so fig3 is composed of the first row in fig1 (i.e., axs1[0, 0] and axs1[0, 1]) and second row in fig2 (i.e., axs2[1, 0] and axs2[1, 1])? Currently, all I could do is to re-plot them. I am curious about whether there is a way that I can just move axes around and re-combine them to make new figures. Thanks! -Shawn -- Yuxiang "Shawn" Wang Gerling Research Lab University of Virginia yw...@vi... +1 (434) 284-0836 https://sites.google.com/a/virginia.edu/yw5aj/ |
From: MaxMax <a32...@dr...> - 2014-05-08 12:02:47
|
thanks I found the spectral colormap is best suited to distinguish between many equal spaced colors. I am find it sad, that matplotlib has so many features, but is so unintuitive to use. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/creating-colors-for-many-plots-tp43381p43383.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Nicolas R. <Nic...@in...> - 2014-05-08 10:12:04
|
A colormap can be called like a function to get the colors associated to (normalized) values. In your example, it is called with uniformly spaced values (linspace) between 0 and 1. This should return the corresponding colors. print plt.get_cmap('gray')(0.0) (0.0, 0.0, 0.0, 1.0) print plt.get_cmap('gray')(1.0) (1.0, 1.0, 1.0, 1.0) print plt.get_cmap('gray')(np.linspace(0,1,6)) [[ 0. 0. 0. 1. ] [ 0.2 0.2 0.2 1. ] [ 0.4 0.4 0.4 1. ] [ 0.6 0.6 0.6 1. ] [ 0.8 0.8 0.8 1. ] [ 1. 1. 1. 1. ]] Nicolas On 08 May 2014, at 11:41, MaxMax <a32...@dr...> wrote: > i have found a solution for creating colors for many plots at this page: > http://stackoverflow.com/questions/7513262/matplotlib-large-set-of-colors-for-plots > > what does this the following line do? > colors = plt.get_cmap('jet')(np.linspace(0, 1.0, len(kinds))) > > plt.get_cmap('jet') gets a LinearSegmentedColormap object and np.linspace > creates a ndarray > but what happens because of this instruction? > > > > -- > View this message in context: http://matplotlib.1069221.n5.nabble.com/creating-colors-for-many-plots-tp43381.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Is your legacy SCM system holding you back? Join Perforce May 7 to find out: > • 3 signs your SCM is hindering your productivity > • Requirements for releasing software faster > • Expert tips and advice for migrating your SCM now > http://p.sf.net/sfu/perforce > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: MaxMax <a32...@dr...> - 2014-05-08 09:41:42
|
i have found a solution for creating colors for many plots at this page: http://stackoverflow.com/questions/7513262/matplotlib-large-set-of-colors-for-plots what does this the following line do? colors = plt.get_cmap('jet')(np.linspace(0, 1.0, len(kinds))) plt.get_cmap('jet') gets a LinearSegmentedColormap object and np.linspace creates a ndarray but what happens because of this instruction? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/creating-colors-for-many-plots-tp43381.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Eric F. <ef...@ha...> - 2014-05-08 00:44:41
|
On 2014/05/07 2:12 PM, Yuxiang Wang wrote: > Dear all, > > I was wondering that, is there a method like axes.set_sharex(ax0) so I > can directly set the sharex and sharey properties of an axes object? > It seems that the only way to do this is at time of creation via > fig.add_subplots(1, 2, 2, sharex=ax0). If I have already created the > axes using the plt.subplots() method, this wouldn't work. > > Could anyone please help make sure that I am understanding this > question correctly? > This is correct. If you use plt.subplots with sharex and/or sharey, the sharing applies to all subplots. Eric > Thank you! > > Shawn |
From: Yuxiang W. <yw...@vi...> - 2014-05-08 00:13:03
|
Dear all, I was wondering that, is there a method like axes.set_sharex(ax0) so I can directly set the sharex and sharey properties of an axes object? It seems that the only way to do this is at time of creation via fig.add_subplots(1, 2, 2, sharex=ax0). If I have already created the axes using the plt.subplots() method, this wouldn't work. Could anyone please help make sure that I am understanding this question correctly? Thank you! Shawn |
From: Neal B. <ndb...@gm...> - 2014-05-07 17:29:41
|
https://github.com/matplotlib/matplotlib/issues/3051 |
From: Paul T. <pau...@gm...> - 2014-05-07 17:29:09
|
I've discovered the problem and a fix. $HOME is set to /home/ptremblay, but /home/ptremblay does not exist. If I do: import os try: import matplotlib except AttributeError as msg: os.environ['HOME'] = '/apollo/env/Ssdf/var/home_config/' import matplotlib Then I can import the library. On Wed, May 7, 2014 at 11:50 AM, Paul Tremblay <pau...@gm...>wrote: > I am using our companies pacaking system. The version of matplotlib is > 1.3.1, by the way. > > > On Wed, May 7, 2014 at 11:32 AM, Paul Hobson <pmh...@gm...> wrote: > >> How did you install matplotlib? I've had success using anaconda on cheap >> $7/month web servers before >> http://continuum.io/downloads >> >> >> On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay <pau...@gm...>wrote: >> >>> I am using matplotllib as part of web server. matplotlib causes my >>> server to crash with this error: >>> >>> File >>> "/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/__init__.py", line >>> 597, in _get_configdir >>> return _get_config_or_cache_dir(_get_xdg_config_dir()) >>> File >>> "/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/__init__.py", line >>> 534, in _get_xdg_config_dir >>> return os.environ.get('XDG_CONFIG_HOME', os.path.join(get_home(), >>> '.config')) >>> File >>> "/apollo/env/Ssdf/bin/../../../package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py", >>> line 77, in join >>> elif path == '' or path.endswith('/'): >>> <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute >>> 'endswith' >>> >>> I have no home directory on my server (and probably don't have the >>> permissions to create one). What is the correct way to fix this problem? >>> >>> Thanks! >>> >>> Paul >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Is your legacy SCM system holding you back? Join Perforce May 7 to find >>> out: >>> • 3 signs your SCM is hindering your productivity >>> • Requirements for releasing software faster >>> • Expert tips and advice for migrating your SCM now >>> http://p.sf.net/sfu/perforce >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >>> >> > |
From: Paul T. <pau...@gm...> - 2014-05-07 15:50:10
|
I am using our companies pacaking system. The version of matplotlib is 1.3.1, by the way. On Wed, May 7, 2014 at 11:32 AM, Paul Hobson <pmh...@gm...> wrote: > How did you install matplotlib? I've had success using anaconda on cheap > $7/month web servers before > http://continuum.io/downloads > > > On Wed, May 7, 2014 at 7:20 AM, Paul Tremblay <pau...@gm...>wrote: > >> I am using matplotllib as part of web server. matplotlib causes my server >> to crash with this error: >> >> File >> "/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/__init__.py", line >> 597, in _get_configdir >> return _get_config_or_cache_dir(_get_xdg_config_dir()) >> File >> "/apollo/env/Ssdf/lib/python2.7/site-packages/matplotlib/__init__.py", line >> 534, in _get_xdg_config_dir >> return os.environ.get('XDG_CONFIG_HOME', os.path.join(get_home(), >> '.config')) >> File >> "/apollo/env/Ssdf/bin/../../../package/local_1/Linux-2.6c2.5-x86_64/Python27/Python27-487.0-0/lib/python2.7/posixpath.py", >> line 77, in join >> elif path == '' or path.endswith('/'): >> <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute >> 'endswith' >> >> I have no home directory on my server (and probably don't have the >> permissions to create one). What is the correct way to fix this problem? >> >> Thanks! >> >> Paul >> >> >> >> ------------------------------------------------------------------------------ >> Is your legacy SCM system holding you back? Join Perforce May 7 to find >> out: >> • 3 signs your SCM is hindering your productivity >> • Requirements for releasing software faster >> • Expert tips and advice for migrating your SCM now >> http://p.sf.net/sfu/perforce >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > |