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
|
|
From: Bruno P. <bru...@gm...> - 2014-06-17 18:59:43
|
Hi all, I'm trying to use imshow to plot some values which fall on the interval [0,1]. I need to use a logscale to emphasize the scales of the data. The solution I found checking some discussions was like this plt.imshow(X, interpolation='none', norm=matplotlib.colors.LogNorm()) However, I notice that the way these colors are assigned are not always the same (although my data always contains the minimum value 0.0 and the maximum 1.0). I need to have a coherent color scale to indicate the real values. Is it easier to do the color code myself? What is the proper way of tackling this problem?? It's pretty much the same problem described here, but with a logscale... http://stackoverflow.com/questions/7875688/how-can-i-create-a-standard-colorbar-for-a-series-of-plots-in-python Thank you very much! Bruno |
|
From: Paul H. <pmh...@gm...> - 2014-06-17 14:37:19
|
Based on the example you posted, you need like: import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.contour(data) ax.axhline(magic_value) On Mon, Jun 16, 2014 at 1:30 AM, dydy2014 <dya...@gm...> wrote: > Hello all, > > I have contour plot like this and I have problem to pick a particular data > along red line and save it. > How do I make it with python program? > > <http://matplotlib.1069221.n5.nabble.com/file/n43532/190311.png> > > Thank you in advance. > > Dydy > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Pick-a-particular-data-from-array-tp43532.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: felix_werner <ff....@gm...> - 2014-06-17 08:33:06
|
Perfect, many thanks! So the trick was _not_ to do "show()" in A.py (Moreover, doing "draw()" in A.py also seems necessary... even though I don't really get why -- actually in my own more complicated program, it works also without this draw...) -- View this message in context: http://matplotlib.1069221.n5.nabble.com/modifying-a-plot-from-an-imported-module-tp43533p43537.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Mike K. <mc...@gm...> - 2014-06-16 20:38:27
|
Hi. The short answer is yes. orion:~ % cat A.py from matplotlib.pyplot import * print "A" plot([0,1],[0,1]) draw() orion:~ % cat B.py from matplotlib.pyplot import * import A print "B" plot([0.5,0.75],[0,1]) draw() show() Using ipython: In [2]: run -i B.py A B and the figure shows both plots. M On 6/16/14, 12:12 PM, felix_werner wrote: > Hello, > > I am plotting something in a file A.py > > In another file (B.py), I wish to do > import A > and then add a curve to that same plot (and replot it). > > Is that possible? > > Thanks! > > > > -- > View this message in context: http://matplotlib.1069221.n5.nabble.com/modifying-a-plot-from-an-imported-module-tp43533.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: ChaoYue <cha...@gm...> - 2014-06-16 16:59:51
|
Hi Andruska, The Basemap.colorbar has a "size" keyword to allow you have the shrink-like function to adjust the size of the colorbar. Otherwise you can creat an axes on the exact position you want to hold the colorbar, like below I have prepared an example for you: arr = np.arange(100).reshape(10,10) fig,ax = plt.subplots(1,1) cs = ax.imshow(arr) ax.set_position([0.2, 0.3, 0.6, 0.6]) axt = fig.add_axes([0.4,0.2,0.4,0.05]) cbar = plt.colorbar(cs,cax=axt,orientation='horizontal') fig.text(0.25,0.22,'I am label',va='center',size=13) draw() I think it's hard to use the colorbar.set_label put the label directly on the left of your colorbar, I rather suggest you to use fig.text to position exactly a text for your label. At the beginning of matplotlib you might feel confused, but after investing a significant amount of time you feel it extremely flexible, and going to like it :) Cheers, Chao On Mon, Jun 16, 2014 at 6:32 PM, Andruska, Michael [via matplotlib] < ml-...@n5...> wrote: > Hi all, > > > > I am having great difficulty understanding how to change the size of my > basemap colorbar, altering its position and moving the text label all at > the same time. I would like to: > > 1. Shrink the size of the colorbar (there doesn’t seem to be a > shrink property in the basemap.colorbar() method (only plt.colorbar() or > fig.colorbar()) > > 2. Move the bar so it is not centered but instead so its right edge > is aligned vertically with the right end of the basemap. > > 3. Move the colorbar W/m^2 text label so it is not below the > colorbar but is instead directly to its left. > > > > I looked up several other responses online that mentioned doing things > such as adding a second axes, or using the shrink command from > plt.colorbar(), and changing some other properties such as padding, but in > the end, most of these alterations seem to introduce another problem when I > try them. Even after viewing their documentation, I still do not fully > understand their proper usage. Also, I tried a few properties listed in the > matplotlib documentation such as anchor and panchor in my the > fig.colorbar() method in attempt to move the bar around but when I tried to > run it, the keyword was not recognized by the interpreter and produced an > error (it seems strange that some of the keywords listed in the docs aren’t > being recognized; and I’m pretty sure I have the most current matplotlib > version too). You can see some of the commented commands I tried in the > code below (not all at once, of course, but just in various conjunctions > with one another). Here is an example of my code and an attached example of > what the plot currently looks like after running said code. Any helpful > advice would be greatly appreciated. So confused right now and I feel like > I’ve read the docs over and over to little avail (P.S. Getting down to the > nitty gritty of working with matplotlib objects and understanding its inner > workings to customize my plots better is really confusing, even with the > docs, (sigh)): > > > > swi = swi.reshape(1059, 1799) > > lat = lat.reshape(1059, 1799) > > lon = lon.reshape(1059, 1799) > > > > def plot_conus(): > > m = mpl_toolkits.basemap.Basemap( > > llcrnrlon=-135.0, > > llcrnrlat=19.0, > > urcrnrlon=-60.0, > > urcrnrlat=54.0, > > projection='mill', > > resolution='c') > > m.drawcoastlines() > > m.drawcountries() > > m.drawstates() > > # draw parallels > > parallels = np.arange(0.,90,10.) > > m.drawparallels(parallels,labels=[1,0,0,0],fontsize=10) > > # draw meridians > > meridians = np.arange(180.,360.,10.) > > m.drawmeridians(meridians,labels=[0,0,0,1],fontsize=10) > > return m > > > > # find hex color values at http://www.colorpicker.com > > swi_colors = [ > > #"#f800fd", # light purple > > #"#9854c6", # dark purple > > "#04e9e7", > > "#019ff4", > > "#0300f4", > > "#02fd02", > > "#01c501", > > "#008e00", > > "#fdf802", > > "#e5bc00", > > "#fd9500", > > "#fd0000", > > "#d40000", > > "#bc0000", > > "#A10505" # brick > > ] > > > > swi_colormap = matplotlib.colors.ListedColormap(swi_colors) > > > > m = plot_conus() > > > > levels = [] > > for i in range(13): > > levels.append(i*90.0) > > > > # create black and white cross at observatory location on map > > site_lon = -87.99495 > > site_lat = 41.70121 > > x_site, y_site = m(site_lon, site_lat) > > m.plot(x_site, y_site, 'w+', markersize=30, markeredgewidth=8) # white > cross > > m.plot(x_site, y_site, 'k+', markersize=25, markeredgewidth=3) # black > cross > > > > norm = matplotlib.colors.BoundaryNorm(levels, 13) > > cax = m.pcolormesh(lon, lat, swi, latlon=True, norm=norm, > > cmap=swi_colormap) > > > > #cbar = m.colorbar(cax) > > fig = plt.gcf() > > #ax = plt.gca() > > #cbar = fig.colorbar(cax, orientation='horizontal', shrink=0.75) > > #cbaxes = fig.add_axes([0.8, 0.1, 0.03, 0.8]) > > #cb = fig.colorbar(cax) > > cbar = m.colorbar(cax, location='bottom', pad='6%') > > cbar.set_label('$W/m^2$', fontsize=18) > > > > plt.title('NOAA LAPS GHI, RT ' + modelrun_time_label + ', VT ' + > fcst_time_label) > > plt.show() > > > > > > ------------------------------------------------------------------------------ > > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > [hidden email] <http://user/SendEmail.jtp?type=node&node=43534&i=0> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > *ghi.gif* (104K) Download Attachment > <http://matplotlib.1069221.n5.nabble.com/attachment/43534/0/ghi.gif> > > > ------------------------------ > If you reply to this email, your message will be added to the discussion > below: > > http://matplotlib.1069221.n5.nabble.com/Altering-Basemap-Colobar-and-Label-positioning-tp43534.html > To start a new topic under matplotlib - users, email > ml-...@n5... > To unsubscribe from matplotlib, click here > <http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=2&code=Y2hhb3l1ZWpveUBnbWFpbC5jb218MnwxMzg1NzAzMzQx> > . > NAML > <http://matplotlib.1069221.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml> > -- please visit: http://www.globalcarbonatlas.org/ *********************************************************************************** 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 ************************************************************************************ -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Altering-Basemap-Colobar-and-Label-positioning-tp43534p43535.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Andruska, M. <man...@an...> - 2014-06-16 16:31:18
|
Hi all, I am having great difficulty understanding how to change the size of my basemap colorbar, altering its position and moving the text label all at the same time. I would like to: 1. Shrink the size of the colorbar (there doesn't seem to be a shrink property in the basemap.colorbar() method (only plt.colorbar() or fig.colorbar()) 2. Move the bar so it is not centered but instead so its right edge is aligned vertically with the right end of the basemap. 3. Move the colorbar W/m^2 text label so it is not below the colorbar but is instead directly to its left. I looked up several other responses online that mentioned doing things such as adding a second axes, or using the shrink command from plt.colorbar(), and changing some other properties such as padding, but in the end, most of these alterations seem to introduce another problem when I try them. Even after viewing their documentation, I still do not fully understand their proper usage. Also, I tried a few properties listed in the matplotlib documentation such as anchor and panchor in my the fig.colorbar() method in attempt to move the bar around but when I tried to run it, the keyword was not recognized by the interpreter and produced an error (it seems strange that some of the keywords listed in the docs aren't being recognized; and I'm pretty sure I have the most current matplotlib version too). You can see some of the commented commands I tried in the code below (not all at once, of course, but just in various conjunctions with one another). Here is an example of my code and an attached example of what the plot currently looks like after running said code. Any helpful advice would be greatly appreciated. So confused right now and I feel like I've read the docs over and over to little avail (P.S. Getting down to the nitty gritty of working with matplotlib objects and understanding its inner workings to customize my plots better is really confusing, even with the docs, (sigh)): swi = swi.reshape(1059, 1799) lat = lat.reshape(1059, 1799) lon = lon.reshape(1059, 1799) def plot_conus(): m = mpl_toolkits.basemap.Basemap( llcrnrlon=-135.0, llcrnrlat=19.0, urcrnrlon=-60.0, urcrnrlat=54.0, projection='mill', resolution='c') m.drawcoastlines() m.drawcountries() m.drawstates() # draw parallels parallels = np.arange(0.,90,10.) m.drawparallels(parallels,labels=[1,0,0,0],fontsize=10) # draw meridians meridians = np.arange(180.,360.,10.) m.drawmeridians(meridians,labels=[0,0,0,1],fontsize=10) return m # find hex color values at http://www.colorpicker.com swi_colors = [ #"#f800fd", # light purple #"#9854c6", # dark purple "#04e9e7", "#019ff4", "#0300f4", "#02fd02", "#01c501", "#008e00", "#fdf802", "#e5bc00", "#fd9500", "#fd0000", "#d40000", "#bc0000", "#A10505" # brick ] swi_colormap = matplotlib.colors.ListedColormap(swi_colors) m = plot_conus() levels = [] for i in range(13): levels.append(i*90.0) # create black and white cross at observatory location on map site_lon = -87.99495 site_lat = 41.70121 x_site, y_site = m(site_lon, site_lat) m.plot(x_site, y_site, 'w+', markersize=30, markeredgewidth=8) # white cross m.plot(x_site, y_site, 'k+', markersize=25, markeredgewidth=3) # black cross norm = matplotlib.colors.BoundaryNorm(levels, 13) cax = m.pcolormesh(lon, lat, swi, latlon=True, norm=norm, cmap=swi_colormap) #cbar = m.colorbar(cax) fig = plt.gcf() #ax = plt.gca() #cbar = fig.colorbar(cax, orientation='horizontal', shrink=0.75) #cbaxes = fig.add_axes([0.8, 0.1, 0.03, 0.8]) #cb = fig.colorbar(cax) cbar = m.colorbar(cax, location='bottom', pad='6%') cbar.set_label('$W/m^2$', fontsize=18) plt.title('NOAA LAPS GHI, RT ' + modelrun_time_label + ', VT ' + fcst_time_label) plt.show() |
|
From: felix_werner <ff....@gm...> - 2014-06-16 16:12:39
|
Hello, I am plotting something in a file A.py In another file (B.py), I wish to do import A and then add a curve to that same plot (and replot it). Is that possible? Thanks! -- View this message in context: http://matplotlib.1069221.n5.nabble.com/modifying-a-plot-from-an-imported-module-tp43533.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: dydy2014 <dya...@gm...> - 2014-06-16 08:30:49
|
Hello all, I have contour plot like this and I have problem to pick a particular data along red line and save it. How do I make it with python program? <http://matplotlib.1069221.n5.nabble.com/file/n43532/190311.png> Thank you in advance. Dydy -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Pick-a-particular-data-from-array-tp43532.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
|
From: Virgil S. <vs...@it...> - 2014-06-15 23:41:48
|
On 16-Jun-14 01:12, Eric Firing wrote: > On 2014/06/15, 12:17 PM, Virgil Stokes wrote: >> There are some rather nice and useful matplotlib examples for colormaps >> that are shown at: >> >> http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb >> >> In*Example 1. Sine wave colored by time (uses the defaults for >> colorline)*, how can one add a colorbar? > lc = colorline(x, y) > cbar = fig.colorbar(lc) > > Eric > > This works fine --- thanks very much Eric. Have a good day |
|
From: Virgil S. <vs...@it...> - 2014-06-15 23:14:02
|
On 16-Jun-14 00:46, Raymond Smith wrote: > Hi Virgil, > > I did something very much like this recently by simply adding an axes > to my figure and using it to show a linspace of the data range off > which the line color was based. See > http://matplotlib.org/examples/color/colormaps_reference.html. > > Best, > Ray > > > On Sun, Jun 15, 2014 at 6:17 PM, Virgil Stokes <vs...@it... > <mailto:vs...@it...>> wrote: > > There are some rather nice and useful matplotlib examples for > colormaps that are shown at: > > http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb > > In*Example 1. Sine wave colored by time (uses the defaults for > colorline)*, how can one add a colorbar? > > --V > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk > Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > Thanks for your response to my request, Ray. I had looked at this approach earlier; but, what I really need is something like is produced by the following code for the cax object: """Produce custom labelling for a colorbar. Original Script: Scott Sinclair Modification: V. Stokes """ import matplotlib.pyplot as plt import numpy as np import matplotlib.colors as col from matplotlib import cm from numpy.random import randn def register_cmap(): """ Purpose: define colormap using the from_List() method as a segmented list and register it. """ cmap_Name = 'reyegr' # my colormap name startcolor = '#00AF33' # truegreen midcolor = '#FFE600' # yolk (a medium dark yellow) endcolor = '#FF0033' # bright red cmap2 = col.LinearSegmentedColormap.from_list(cmap_Name, [startcolor,midcolor,endcolor]) cm.register_cmap(cmap=cmap2) return cm.get_cmap(cmap_Name) # my new cmap for 'reylgr' #----------------------------------------------------------------------------- my_cmap = register_cmap() ## Vertical colorbar-1 fig, ax = plt.subplots() data = np.clip(randn(250, 250), -1, 1) cax = ax.imshow(data, interpolation='nearest', cmap=my_cmap) ax.set_title('Gaussian noise with vertical colorbar') # Add colorbar, make sure to specify tick locations to match desired ticklabels cbar = fig.colorbar(cax, ticks=[-1, 0, 1]) cbar.ax.set_yticklabels(['<-1', '0', '> 1'])# vertically oriented colorbar ## Vertical colorbar-2 fig, ax = plt.subplots() data = np.clip(randn(50, 50), -1, 1) #cax = ax.imshow(data, interpolation='nearest', cmap=cm.coolwarm) cax = ax.imshow(data, interpolation='nearest', cmap=my_cmap) ax.set_title('Gaussian noise with vertical colorbar') # Add colorbar, make sure to specify tick locations to match desired ticklabels cbar = fig.colorbar(cax, ticks=[-1, 0, 1]) # Vertically oriented (by default) colorbar cbar.ax.set_yticklabels(['Low', 'Medium', 'High']) ## Horizontal colorbar fig, ax = plt.subplots() # cax = ax.imshow(data, interpolation='nearest', cmap=my_cmap) ax.set_title('Gaussian noise with horizontal colorbar') cbar = fig.colorbar(cax, ticks=[-1, 0, 1], orientation='horizontal') cbar.ax.set_xticklabels(['Low', 'Medium', 'High'])# horizontal colorbar plt.show() But, for a colorline object, which was referenced in the link given in my earlier email. --V |
|
From: Eric F. <ef...@ha...> - 2014-06-15 23:12:24
|
On 2014/06/15, 12:17 PM, Virgil Stokes wrote: > There are some rather nice and useful matplotlib examples for colormaps > that are shown at: > > http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb > > In*Example 1. Sine wave colored by time (uses the defaults for > colorline)*, how can one add a colorbar? lc = colorline(x, y) cbar = fig.colorbar(lc) Eric > > --V > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Raymond S. <sm...@mi...> - 2014-06-15 22:47:28
|
Hi Virgil, I did something very much like this recently by simply adding an axes to my figure and using it to show a linspace of the data range off which the line color was based. See http://matplotlib.org/examples/color/colormaps_reference.html. Best, Ray On Sun, Jun 15, 2014 at 6:17 PM, Virgil Stokes <vs...@it...> wrote: > There are some rather nice and useful matplotlib examples for colormaps > that are shown at: > > > http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb > > In* Example 1. Sine wave colored by time (uses the defaults for > colorline)*, how can one add a colorbar? > > --V > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: Virgil S. <vs...@it...> - 2014-06-15 22:39:08
|
There are some rather nice and useful matplotlib examples for colormaps that are shown at: http://nbviewer.ipython.org/github/dpsanders/matplotlib-examples/blob/master/colorline.ipynb In*Example 1. Sine wave colored by time (uses the defaults for colorline)*, how can one add a colorbar? --V |
|
From: Neal B. <ndb...@gm...> - 2014-06-13 11:35:13
|
I use pip install --user <whatever> |
|
From: Eric F. <ef...@ha...> - 2014-06-12 17:39:41
|
On 2014/06/12, 6:07 AM, M.Rule wrote: > Hi all, > > I haven't been able to find a more official place to report potential > Matplotlib bugs, so I'm going to describe the issue I'm seeing here. > Sorry if this is the wrong forum. This is *exactly* the right place to make a report like this. It is better to start with a message to a wide audience (at least, we hope it is a wide audience) such as this list, or maybe stack overflow, to see if someone else recognizes the problem. In many cases, it is not a matplotlib bug. If the response to an email like this does not lead to a solution, and the consensus is that it looks like you have hit a real bug, *then* file an issue on github. > > On my system, it takes matplotlib a very very long time to close plots. > Sometimes, up to 20 minutes to close a simple figure. Creating new > figures remains fast. The problem seems to occur only when I've loaded a > large amount of data in to python ( on the order of 1GB ). I am using > the current version of Ubuntu and running "ipython --pylab". To > reproduce on my system, it is sufficient to load a large amount of data, > create a plot.. any plot, and then try to close it using the little "x" > at the top right corner of the window. The whole session will freeze for > an extended period of time. The plot does not have to be complex: a > hundred datapoints, a thousand, it makes no difference. Since the > problem only occurs when a large amount of data has been loaded, my > guess is that there is a problem with how Matplotlib/Pylab/Python is > trying to free the memory associated with the figure? This sounds like the problem that prompted another user to propose https://github.com/matplotlib/matplotlib/pull/3045, except that your case sounds *much* more severe. Can you reproduce the data loading and plot generation in a script that does not have to be run via ipython? And if so, is it still slow? Is the large amount of data in the form of a very large number of python objects? Is there something odd about the data structure--extreme complexity that would make garbage collection take an absurd amount of time? Since this does sound like the problem addressed by the pull request ("PR") noted above, please add your report (and any answers to my questions) as a comment on that PR. Eric > > So... I just though I'd put this out there in case anyone else sees the > same issue, or in case a developer who knows why this might be happening > reads this. The workaround for me is... to simply wait for the figures > to close, however long that may take, or restart the whole session. > > Best, > michael. > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Eric F. <ef...@ha...> - 2014-06-12 17:18:28
|
On 2014/06/12, 4:14 AM, Rachana Katkam wrote: > Hi all, > I have an issue in upgrading my matplotlib 1.0.1 to 1.3.1 > I am using Fedora, but the command: > Yum update python-matplotlib is not working. > My python version is 2.7, is that an issue? > Is there any way for upgrading matplotlib? Updating via a linux distro generally won't bring you a new version. Two options: 1) Install it yourself independently, typically in /usr/local/, compiling from source. This will involve making sure you have some build dependencies. Simply using "pip install matplotlib", or something very much like that, might work. 2) Get an entire independent python installation such as Anaconda from continuum.io. This provides an easy way of keeping everything up to date. This is what I recommend unless you really want to learn how to build and install software yourself, independently of installers like yum. Eric > > Regards, > Rachana K > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Eric F. <ef...@ha...> - 2014-06-12 17:07:32
|
On 2014/06/12, 1:01 AM, Rachana Katkam wrote: > Hi all, > > I am stuck with plotting that uses brewer2mpl. > The following link describes my problem, please have a look at it: > > http://stackoverflow.com/questions/24181183/matplotlib-brewr2mpl-plotting-issue The traceback doesn't match the code I find in mpl 1.3.1; I think you have hit a bug that has been fixed. I recommend upgrading. There have been a lot of improvements since 1.0.1. As a workaround, you could try changing your call to "plt.grid(...)" to start with the positional argument True, so it would be plt.grid(True, axis='y', color='white', linestyle='-', lw=1) Eric > > Regards, > Rachana K > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > > > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
|
From: Nemanja S. <vla...@gm...> - 2014-06-12 16:22:56
|
Well, step by step it goes. So, I realized that for "normal" behaviour, all axeses should have same y limit, but i need different, so there should be certain way to calculate differente num values for aspect ratio for every axes based on ylim value. But i hope there is more easier way to do that? Best On Thu, Jun 12, 2014 at 6:03 PM, Nemanja Savic <vla...@gm...> wrote: > Hi again, > > I think I am very near to discover how the things work, but I need a bit > or ur help. What I basically want is to apply the same aspect ratio to all > Axes objects. I realized that whenevr twinx is called, a new axes is added > in the list of axeses. So, my question is now, why when I set aspect ratio > of 0.5 to one of the axeses, the others don't follow that? > > Best > > > On Thu, Jun 12, 2014 at 5:44 AM, Nemanja Savic <vla...@gm...> wrote: > >> Hi all guys, >> >> I have already spent a lot of time trying to figure out how to set the >> aspect ratio of all axeses in my plot which consists of a single subplot >> and three y axes. Namely, i tried to set the aspect ratio of the base axes, >> and i expect after twinx that others will inheritt that. So, what i >> basically want is to make figure wider and thiner. >> >> Best regards and thanx, >> >> -- >> Nemanja Savić >> > > > > -- > Nemanja Savić > -- Nemanja Savić |
|
From: Francesco M. <fra...@gm...> - 2014-06-12 16:20:51
|
Hi Michael, I don't have an answer about your bug. But the official place to report possible bugs is github. https://github.com/matplotlib/matplotlib/issues?state=open Cheers, Fra 2014-06-12 18:07 GMT+02:00 M.Rule <mru...@gm...>: > Hi all, > > I haven't been able to find a more official place to report potential > Matplotlib bugs, so I'm going to describe the issue I'm seeing here. Sorry > if this is the wrong forum. > > On my system, it takes matplotlib a very very long time to close plots. > Sometimes, up to 20 minutes to close a simple figure. Creating new figures > remains fast. The problem seems to occur only when I've loaded a large > amount of data in to python ( on the order of 1GB ). I am using the current > version of Ubuntu and running "ipython --pylab". To reproduce on my system, > it is sufficient to load a large amount of data, create a plot.. any plot, > and then try to close it using the little "x" at the top right corner of > the window. The whole session will freeze for an extended period of time. > The plot does not have to be complex: a hundred datapoints, a thousand, it > makes no difference. Since the problem only occurs when a large amount of > data has been loaded, my guess is that there is a problem with how > Matplotlib/Pylab/Python is trying to free the memory associated with the > figure? > > So... I just though I'd put this out there in case anyone else sees the > same issue, or in case a developer who knows why this might be happening > reads this. The workaround for me is... to simply wait for the figures to > close, however long that may take, or restart the whole session. > > Best, > michael. > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
|
From: M.Rule <mru...@gm...> - 2014-06-12 16:07:51
|
Hi all, I haven't been able to find a more official place to report potential Matplotlib bugs, so I'm going to describe the issue I'm seeing here. Sorry if this is the wrong forum. On my system, it takes matplotlib a very very long time to close plots. Sometimes, up to 20 minutes to close a simple figure. Creating new figures remains fast. The problem seems to occur only when I've loaded a large amount of data in to python ( on the order of 1GB ). I am using the current version of Ubuntu and running "ipython --pylab". To reproduce on my system, it is sufficient to load a large amount of data, create a plot.. any plot, and then try to close it using the little "x" at the top right corner of the window. The whole session will freeze for an extended period of time. The plot does not have to be complex: a hundred datapoints, a thousand, it makes no difference. Since the problem only occurs when a large amount of data has been loaded, my guess is that there is a problem with how Matplotlib/Pylab/Python is trying to free the memory associated with the figure? So... I just though I'd put this out there in case anyone else sees the same issue, or in case a developer who knows why this might be happening reads this. The workaround for me is... to simply wait for the figures to close, however long that may take, or restart the whole session. Best, michael. |
|
From: Nemanja S. <vla...@gm...> - 2014-06-12 16:04:07
|
Hi again, I think I am very near to discover how the things work, but I need a bit or ur help. What I basically want is to apply the same aspect ratio to all Axes objects. I realized that whenevr twinx is called, a new axes is added in the list of axeses. So, my question is now, why when I set aspect ratio of 0.5 to one of the axeses, the others don't follow that? Best On Thu, Jun 12, 2014 at 5:44 AM, Nemanja Savic <vla...@gm...> wrote: > Hi all guys, > > I have already spent a lot of time trying to figure out how to set the > aspect ratio of all axeses in my plot which consists of a single subplot > and three y axes. Namely, i tried to set the aspect ratio of the base axes, > and i expect after twinx that others will inheritt that. So, what i > basically want is to make figure wider and thiner. > > Best regards and thanx, > > -- > Nemanja Savić > -- Nemanja Savić |
|
From: Nemanja S. <vla...@gm...> - 2014-06-12 15:08:21
|
It works thanx.
On Thu, Jun 12, 2014 at 4:45 PM, Nemanja Savic <vla...@gm...> wrote:
> Thanx, I will try. By the way hiw to implement this into set_ylabel
> function? is just "text$_..." enough?
>
>
> On Thu, Jun 12, 2014 at 2:40 PM, Mike Kaufman <mc...@gm...> wrote:
>
>> use matplotlib's internal latex parsing:
>>
>> text(0.2,0.4,"text$_{\mathrm{subscript}}$")
>>
>> M
>>
>> On 6/12/14, 6:26 AM, Nemanja Savic wrote:
>> > Hi all guys,
>> >
>> > I am not able to find answer on my question: how to write subscripts
>> > using default matplotlib font?
>> >
>> > best,
>> >
>> > --
>> > Nemanja Savić
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > HPCC Systems Open Source Big Data Platform from LexisNexis Risk
>> Solutions
>> > Find What Matters Most in Your Big Data with HPCC Systems
>> > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>> > Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>> > http://p.sf.net/sfu/hpccsystems
>> >
>> >
>> >
>> > _______________________________________________
>> > Matplotlib-users mailing list
>> > Mat...@li...
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> >
>>
>>
>>
>> ------------------------------------------------------------------------------
>> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
>> Find What Matters Most in Your Big Data with HPCC Systems
>> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
>> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
>> http://p.sf.net/sfu/hpccsystems
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>
>
>
> --
> Nemanja Savić
>
--
Nemanja Savić
|
|
From: Nemanja S. <vla...@gm...> - 2014-06-12 14:46:07
|
Thanx, I will try. By the way hiw to implement this into set_ylabel
function? is just "text$_..." enough?
On Thu, Jun 12, 2014 at 2:40 PM, Mike Kaufman <mc...@gm...> wrote:
> use matplotlib's internal latex parsing:
>
> text(0.2,0.4,"text$_{\mathrm{subscript}}$")
>
> M
>
> On 6/12/14, 6:26 AM, Nemanja Savic wrote:
> > Hi all guys,
> >
> > I am not able to find answer on my question: how to write subscripts
> > using default matplotlib font?
> >
> > best,
> >
> > --
> > Nemanja Savić
> >
> >
> >
> ------------------------------------------------------------------------------
> > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> > Find What Matters Most in Your Big Data with HPCC Systems
> > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> > Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> > http://p.sf.net/sfu/hpccsystems
> >
> >
> >
> > _______________________________________________
> > Matplotlib-users mailing list
> > Mat...@li...
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> >
>
>
>
> ------------------------------------------------------------------------------
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
--
Nemanja Savić
|
|
From: Rachana K. <kat...@gm...> - 2014-06-12 14:14:52
|
Hi all, I have an issue in upgrading my matplotlib 1.0.1 to 1.3.1 I am using Fedora, but the command: Yum update python-matplotlib is not working. My python version is 2.7, is that an issue? Is there any way for upgrading matplotlib? Regards, Rachana K |
|
From: Tim <tjo...@gm...> - 2014-06-12 12:58:43
|
I had just been looking into this myself. My starting point would be this example: http://stackoverflow.com/questions/13570287/image-overlay-in-3d-plot-using-python but instead of the hard-coded '10' as the z values in plot_surface, put in whatever data or function of x and y that you want. Using x+y seemed to do what I expected. Is that what you're looking for? On Wed, Jun 11, 2014 at 2:40 PM, Hearne, Mike <mh...@us...> wrote: > Is it possible to drape an image over a topography dataset? One example, > from a package called GMT, is here: > > http://gmt.soest.hawaii.edu/doc/5.1.1/gallery/ex32.html > > If so, does anyone have a sample of how this would be accomplished? > > Thanks, > > Mike > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |