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
(7) |
2
(3) |
3
(2) |
4
(2) |
5
(2) |
6
(3) |
7
(1) |
8
(9) |
9
(1) |
10
(9) |
11
(2) |
12
|
13
(1) |
14
(11) |
15
(8) |
16
(7) |
17
(10) |
18
(2) |
19
(3) |
20
(9) |
21
(3) |
22
(3) |
23
(1) |
24
(12) |
25
(1) |
26
(3) |
27
(3) |
28
(6) |
29
(1) |
30
(6) |
31
(1) |
|
From: Benjamin R. <ben...@ou...> - 2014-10-24 19:23:47
|
Do you mean choropleth? http://en.wikipedia.org/wiki/Choropleth_map On Fri, Oct 24, 2014 at 1:18 PM, ianalis <ia...@gm...> wrote: > I have been creating chloropleth maps in Python by adding patches and/or > polygons in a matplotlib Axes but I'm looking for something easier to use. > > Ideally, the interface should be similar to how contour maps or pseudocolor > plots are created where, at the minimum, only one call to a function is > needed to create these plots from data. Colors are automatically assigned > and normalized based on values. A colorbar can then be added by calling > another function. > > So far, the closest package seems to be geopandas. Is there an another > package that is nearer to what I want? That is, is there a package that can > make a (basic) chloropleth of values stored as a dictionary, numpy array or > pandas dataframe in one call? > > I'm willing to contribute code and help develop the chloropleth capability > of a package since I currently end up creating my own function and > manipulating Axes internals just to create a chloropleth. > > > > -- > View this message in context: > http://matplotlib.1069221.n5.nabble.com/Easiest-way-to-create-a-chloropleth-in-Python-tp44195.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Sterling S. <sm...@fu...> - 2014-10-24 18:36:33
|
Your solution is about as good as "proxy artists" in legends, which would be the official method. (Google "proxy artist matplotlib".) It may be relevant that you can access the marker of the legend entries with the _marker attribute of the handles. Search the mailing list archives for this one. -Sterling On Oct 23, 2014, at 8:05PM, Tommy Carstensen wrote: > Is there a way to have all markers in the legend box have the same size? > www.tommycarstensen.com/python3_matplotlib_basemap_merc_bluemarbleTrue_scaledTrue_1000GTrue_hresolution.jpg > > I came up with a solution by plotting a marker outside the latitude > and longitude range, but that's not a very good solution. > > Thanks for your time. > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: ianalis <ia...@gm...> - 2014-10-24 17:18:34
|
I have been creating chloropleth maps in Python by adding patches and/or polygons in a matplotlib Axes but I'm looking for something easier to use. Ideally, the interface should be similar to how contour maps or pseudocolor plots are created where, at the minimum, only one call to a function is needed to create these plots from data. Colors are automatically assigned and normalized based on values. A colorbar can then be added by calling another function. So far, the closest package seems to be geopandas. Is there an another package that is nearer to what I want? That is, is there a package that can make a (basic) chloropleth of values stored as a dictionary, numpy array or pandas dataframe in one call? I'm willing to contribute code and help develop the chloropleth capability of a package since I currently end up creating my own function and manipulating Axes internals just to create a chloropleth. -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Easiest-way-to-create-a-chloropleth-in-Python-tp44195.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Filipe P. A. F. <oc...@gm...> - 2014-10-24 11:26:23
|
Hi Tommy, there is not easy way to do it with matplolib+basemap. Also, you will find it extra hard because the image you are plotting (blue marble) is raster that is cut in lon, lat bounding box. Therefore, unless you create a mask around what to plot and what not to plot, it will show everything that is inside that box. One alternative is cartopy. With cartopy you have easy access to Natural Earth features. That way you can find the proper feature, that represents just the African continent, and plot it: http://scitools.org.uk/cartopy/docs/latest/examples/hurricane_katrina.html https://ocefpaf.github.io/python4oceanographers/blog/2013/09/30/natural_earth/ Good luck! -Filipe On Fri, Oct 24, 2014 at 7:21 AM, Tommy Carstensen < tom...@gm...> wrote: > Does anyone know, whether a continent can be left out when plotting > with matplotlib basemap? For example I wish to hide Europe (and > Madagascar) on this plot: > > http://www.tommycarstensen.com/python3_matplotlib_basemap_merc_bluemarbleTrue_scaledTrue_1000GTrue_hresolution.jpg |
From: Tommy C. <tom...@gm...> - 2014-10-24 10:22:23
|
Does anyone know, whether a continent can be left out when plotting with matplotlib basemap? For example I wish to hide Europe (and Madagascar) on this plot: http://www.tommycarstensen.com/python3_matplotlib_basemap_merc_bluemarbleTrue_scaledTrue_1000GTrue_hresolution.jpg On Sat, Oct 18, 2014 at 7:57 AM, Tommy Carstensen <tom...@gm...> wrote: > Is it possible to tell matplotlib to only plot the African continent? > http://tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg > > I can do this in gnuplot, but I can't figure out how to do it with > matplotlib/basemap. > > Thanks, > Tommy |
From: Scott L. <sl...@sp...> - 2014-10-24 05:55:06
|
You might try unchecking "Anti-alias text and line art" in the PDF panel in Preview's Preferences dialog to see if that helps. Best regards, Scott On Oct 23, 2014, at 8:49 PM, Frédéric Vogt <fre...@an...> wrote: > Interesting development of the issue described below, shared with the list for legacy purposes. > > As it turns out, which PDF viewer one uses does matter when it comes to printing (on paper) matplotlib figures containing 'imshow' plots and saved as .pdf. The problem I had was the result of printing the matplotlib figure via Mac OSX's "Preview". If I print the same figure via Acrobat Reader, then the grid in both panel look identical, the panel edges are sharp and crisp, etc ... > > This most certainly points out towards a difference deep inside Preview and Acrobat - haven't tried other PDF viewers. > > For reference, I am on Mac OS 10.6, used Preview 5.0.3 and Acrobat reader 10.1.12. > > Cheers, > Fréd > > > On 23/10/2014, at 10:07 PM, Frédéric Vogt wrote: > >> Hi everyone, >> >> Using 'imshow' to plot a few arrays (arranged with gridspec) that I then export directly to a .pdf file using savefig, I noticed that when I print the .pdf file (i.e. on real paper) some of the subplots are blurry. >> >> To clarify: >> - in all my figures, there is always 1 subplot very sharp and crisp, and all the others are slightly blurry, >> - the effect is not visible on the screen at any zoom level, >> - the effect is very slight, and hardly noticeable ... until you plot a fine dotted grid - and then, it becomes evident (the grid points pop out a LOT more in the sharp plot), >> - the entire 'sub-image' is blurred (axes, on-image text, grids, etc...) but the axis labels and tick labels are fine. >> >> This effect is hard to describe, so I placed an example here: http://www.mso.anu.edu.au/~fvogt/mpl_tmp/ >> You can compare the original pdf (straight out of Python) and the 'scanned-printed' version. The scan is not of the highest quality, but you can definitely see that the grid on the left is fainter - and if you zoom in, the figure's edges are also less sharp. >> >> I tried (and failed) to find info on the web so far (I'm still searching). In the meantime, has anyone seen this effect before ? Is this a documented bug/feature ? >> >> I suspect that it may be related to how subplots (containing distinct images) are exported to .pdf, but it is a long way beyond my current knowledge of the savefig function. Note that playing with the dpi setting (I went up to 1200) doesn't help (I can see the improvement on the images themselves but the print blurriness remains). And just in case you wonder, the print bluriness also remains whether I print the .pdf straight out of Python or include it inside a Latex document first. >> >> Any ideas on how to fix/go around this ? >> >> Cheers, >> Fréd >> >> P.S.: The effect is not present if I export my figures in png. But for quality purposes, I'd much rather try to avoid going through png if I can ... >> >> ------------------------------------------------------------------------------ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Tommy C. <tom...@gm...> - 2014-10-24 03:06:21
|
Is there a way to have all markers in the legend box have the same size? www.tommycarstensen.com/python3_matplotlib_basemap_merc_bluemarbleTrue_scaledTrue_1000GTrue_hresolution.jpg I came up with a solution by plotting a marker outside the latitude and longitude range, but that's not a very good solution. Thanks for your time. |
From: Frédéric V. <fre...@an...> - 2014-10-24 00:50:14
|
Interesting development of the issue described below, shared with the list for legacy purposes. As it turns out, which PDF viewer one uses does matter when it comes to printing (on paper) matplotlib figures containing 'imshow' plots and saved as .pdf. The problem I had was the result of printing the matplotlib figure via Mac OSX's "Preview". If I print the same figure via Acrobat Reader, then the grid in both panel look identical, the panel edges are sharp and crisp, etc ... This most certainly points out towards a difference deep inside Preview and Acrobat - haven't tried other PDF viewers. For reference, I am on Mac OS 10.6, used Preview 5.0.3 and Acrobat reader 10.1.12. Cheers, Fréd On 23/10/2014, at 10:07 PM, Frédéric Vogt wrote: > Hi everyone, > > Using 'imshow' to plot a few arrays (arranged with gridspec) that I then export directly to a .pdf file using savefig, I noticed that when I print the .pdf file (i.e. on real paper) some of the subplots are blurry. > > To clarify: > - in all my figures, there is always 1 subplot very sharp and crisp, and all the others are slightly blurry, > - the effect is not visible on the screen at any zoom level, > - the effect is very slight, and hardly noticeable ... until you plot a fine dotted grid - and then, it becomes evident (the grid points pop out a LOT more in the sharp plot), > - the entire 'sub-image' is blurred (axes, on-image text, grids, etc...) but the axis labels and tick labels are fine. > > This effect is hard to describe, so I placed an example here: http://www.mso.anu.edu.au/~fvogt/mpl_tmp/ > You can compare the original pdf (straight out of Python) and the 'scanned-printed' version. The scan is not of the highest quality, but you can definitely see that the grid on the left is fainter - and if you zoom in, the figure's edges are also less sharp. > > I tried (and failed) to find info on the web so far (I'm still searching). In the meantime, has anyone seen this effect before ? Is this a documented bug/feature ? > > I suspect that it may be related to how subplots (containing distinct images) are exported to .pdf, but it is a long way beyond my current knowledge of the savefig function. Note that playing with the dpi setting (I went up to 1200) doesn't help (I can see the improvement on the images themselves but the print blurriness remains). And just in case you wonder, the print bluriness also remains whether I print the .pdf straight out of Python or include it inside a Latex document first. > > Any ideas on how to fix/go around this ? > > Cheers, > Fréd > > P.S.: The effect is not present if I export my figures in png. But for quality purposes, I'd much rather try to avoid going through png if I can ... > > ------------------------------------------------------------------------------ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Frédéric V. <fre...@an...> - 2014-10-23 11:07:36
|
Hi everyone, Using 'imshow' to plot a few arrays (arranged with gridspec) that I then export directly to a .pdf file using savefig, I noticed that when I print the .pdf file (i.e. on real paper) some of the subplots are blurry. To clarify: - in all my figures, there is always 1 subplot very sharp and crisp, and all the others are slightly blurry, - the effect is not visible on the screen at any zoom level, - the effect is very slight, and hardly noticeable ... until you plot a fine dotted grid - and then, it becomes evident (the grid points pop out a LOT more in the sharp plot), - the entire 'sub-image' is blurred (axes, on-image text, grids, etc...) but the axis labels and tick labels are fine. This effect is hard to describe, so I placed an example here: http://www.mso.anu.edu.au/~fvogt/mpl_tmp/ You can compare the original pdf (straight out of Python) and the 'scanned-printed' version. The scan is not of the highest quality, but you can definitely see that the grid on the left is fainter - and if you zoom in, the figure's edges are also less sharp. I tried (and failed) to find info on the web so far (I'm still searching). In the meantime, has anyone seen this effect before ? Is this a documented bug/feature ? I suspect that it may be related to how subplots (containing distinct images) are exported to .pdf, but it is a long way beyond my current knowledge of the savefig function. Note that playing with the dpi setting (I went up to 1200) doesn't help (I can see the improvement on the images themselves but the print blurriness remains). And just in case you wonder, the print bluriness also remains whether I print the .pdf straight out of Python or include it inside a Latex document first. Any ideas on how to fix/go around this ? Cheers, Fréd P.S.: The effect is not present if I export my figures in png. But for quality purposes, I'd much rather try to avoid going through png if I can ... |
From: Russell O. <ro...@uw...> - 2014-10-22 18:26:57
|
I'm seeing a memory leak with calls to subplot.clear() and canvas.draw() on MacOS. The same code shows no leakage on unix. Here is a simple script that demonstrates the problem. #!/usr/bin/env python from __future__ import division """Demonstrate a memory leak in matplotlib on MacOS with TkAgg Variants: - Comment out subplot.clear(): this reduces the leak by about 4/5 - Comment out canvas.draw(): this reduces the leak by about 1/5 - Comment out both: there should be essentially no leakage The leak rate seems to be affected by the update rate (larger update interval causes lower leakage), which suggests it's not a simple "x amount of leakage per call". """ import resource import time import Tkinter import matplotlib from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg class MemoryLeaker(Tkinter.Frame): """Demonstrate a memory leak in matplotlib """ def __init__(self, master, updateInterval=0.1, updatesPerReport=25): """Construct a MemoryLeaker Inputs: - master: master widget - updateInterval: interval at which subplot.clear and canvas.draw are called - updatesPerReport: number of updates between memory reports """ Tkinter.Frame.__init__(self, master) self._updateInterval = float(updateInterval) self._updatesPerReport = int(updatesPerReport) self.figure = matplotlib.figure.Figure(figsize=(8, 2), frameon=True) self.canvas = FigureCanvasTkAgg(self.figure, self) self.canvas.get_tk_widget().grid(row=0, column=0, sticky="news") self.subplot = self.figure.add_subplot(1, 1, 1) print "time max RSS leak rate" print "(sec) (kb) (kb/sec)" self._prevTime = time.time() self._prevMem = float("nan") self._reportCount = 0 self.updatePlot() def updatePlot(self): """Update the plot; calls itself at the update interval """ if self._reportCount == 0: self.reportMem() self._reportCount = (self._reportCount + 1) % self._updatesPerReport self.subplot.clear() self.canvas.draw() self.after(int(self._updateInterval * 1000), self.updatePlot) def reportMem(self): currTime = time.time() dTime = currTime - self._prevTime res = resource.getrusage(resource.RUSAGE_SELF) currMem = res.ru_maxrss / 1024 # maximum resident set size utilized (in kb) leakRate = (currMem - self._prevMem) / dTime self._prevTime = currTime self._prevMem = currMem print "%6.1f %6d %6.1f" % (dTime, currMem, leakRate) if __name__ == "__main__": root = Tkinter.Tk() wdg = MemoryLeaker(root, updateInterval=0.1, updatesPerReport=25) wdg.pack(expand=True, fill="both") root.mainloop() P.S. my current setup is: - MacOS 10.9 - python.org python 2.7.8 - matploblib 1.3.1 - a pre-release of Tcl/Tk 8.5.17 but I've seen this on many earlier versions, as well I have not tried it with matplotlib 1.4.1 yet (due to problems packaging that with py2app). |
From: Tommy C. <tom...@gm...> - 2014-10-22 16:37:53
|
I was able to solve my two problems by doing label="" and numpoints=1. Thank you very much for your help. I found my solution here: http://stackoverflow.com/questions/19385639/duplicate-items-in-legend-in-matplotlib There is also another cleaner solution here: http://stackoverflow.com/questions/13588920/stop-matplotlib-repeating-labels-in-legend import matplotlib matplotlib.use('Agg') from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt map = Basemap() map.plot(label="") plt.legend(numpoints=1) On Mon, Oct 20, 2014 at 8:11 AM, Benjamin Root <ben...@ou...> wrote: > Legends entries are blindly constructed. Each plotting call that has a > legend keyword argument will produce a legend entry if you are automatically > building the legend. You can pass a label value of "__nolabel__" to prevent > an entry if you know you are about to do something that would duplicate the > entries. Another approach is to manually collect unique artists and manually > build the legend (I think there is an example of that in the gallary). > > As for configuring the legend, there are a bunch of parameters that can be > set for sizing the font. I think the sizing of the marker is determined by > their size in the plot, though. > > Cheers! > Ben Root > > > On Mon, Oct 20, 2014 at 10:46 AM, Hearne, Mike <mh...@us...> wrote: >> >> For your first question: Use the legend "numpoints" keyword. I think >> if you set it to 1, it should solve that problem. >> >> For your second question, I'm not sure, but I'll bet if you poke >> around in the Legend object returned by the function, you'll find >> something. >> >> On Mon, Oct 20, 2014 at 8:04 AM, Tommy Carstensen >> <tom...@gm...> wrote: >> > How does one avoid duplicate legends? >> > >> > www.tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg >> > >> > Can I make the legend size smaller than the marker size? >> > >> > >> > ------------------------------------------------------------------------------ >> > Comprehensive Server Monitoring with Site24x7. >> > Monitor 10 servers for $9/Month. >> > Get alerted through email, SMS, voice calls or mobile push >> > notifications. >> > Take corrective actions from your mobile device. >> > http://p.sf.net/sfu/Zoho >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Paul H. <pmh...@gm...> - 2014-10-22 16:01:32
|
I seem to recall that the MaxNLocator and some carefully chosen axes limits suffices for me in the past. On Tue, Oct 21, 2014 at 11:44 AM, Adam Hughes <hug...@gm...> wrote: > I wrote a program that draws grids manually on mpl plots a while back. If > you can't find a solution can you write back here and I'll try to get that > dusted off? > On Oct 21, 2014 2:39 PM, "Benjamin Root" <ben...@ou...> wrote: > >> Well, the first part is easy... it is called twinx(). If you look up axis >> twinning in the documentation, you will find a lot of examples of this. >> >> As for the grids part... that would be tricky. I would first just see if >> matplotlib "just does the right thing". Doubtful, but who knows? Then I >> would likely go the route of lining up the major ticks on both axes so that >> the grid lines for one axes match up with the ticks for the other. >> >> Let us know what you find out. Maybe it might be a useful feature to add >> for twinning. >> >> Cheers! >> Ben Root >> >> >> On Tue, Oct 21, 2014 at 2:29 PM, Neal Becker <ndb...@gm...> wrote: >> >>> I need to overlay 2 different plots. They will share an x-axis, but >>> will have 2 >>> different y axis with 2 different sets of units. I want one y-axis on >>> left and >>> one on right. >>> >>> But to make it harder, I want a grid. That means, there are either 2 >>> different >>> grids, which is ugly, or one plot has to be scaled vertically so that >>> the same y >>> grid can be shared between them. >>> >>> Anyone know how to do this? >>> >>> -- >>> -- Those who don't understand recursion are doomed to repeat it >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Comprehensive Server Monitoring with Site24x7. >>> Monitor 10 servers for $9/Month. >>> Get alerted through email, SMS, voice calls or mobile push notifications. >>> Take corrective actions from your mobile device. >>> http://p.sf.net/sfu/Zoho >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Adam H. <hug...@gm...> - 2014-10-21 18:44:32
|
I wrote a program that draws grids manually on mpl plots a while back. If you can't find a solution can you write back here and I'll try to get that dusted off? On Oct 21, 2014 2:39 PM, "Benjamin Root" <ben...@ou...> wrote: > Well, the first part is easy... it is called twinx(). If you look up axis > twinning in the documentation, you will find a lot of examples of this. > > As for the grids part... that would be tricky. I would first just see if > matplotlib "just does the right thing". Doubtful, but who knows? Then I > would likely go the route of lining up the major ticks on both axes so that > the grid lines for one axes match up with the ticks for the other. > > Let us know what you find out. Maybe it might be a useful feature to add > for twinning. > > Cheers! > Ben Root > > > On Tue, Oct 21, 2014 at 2:29 PM, Neal Becker <ndb...@gm...> wrote: > >> I need to overlay 2 different plots. They will share an x-axis, but will >> have 2 >> different y axis with 2 different sets of units. I want one y-axis on >> left and >> one on right. >> >> But to make it harder, I want a grid. That means, there are either 2 >> different >> grids, which is ugly, or one plot has to be scaled vertically so that the >> same y >> grid can be shared between them. >> >> Anyone know how to do this? >> >> -- >> -- Those who don't understand recursion are doomed to repeat it >> >> >> >> ------------------------------------------------------------------------------ >> Comprehensive Server Monitoring with Site24x7. >> Monitor 10 servers for $9/Month. >> Get alerted through email, SMS, voice calls or mobile push notifications. >> Take corrective actions from your mobile device. >> http://p.sf.net/sfu/Zoho >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > |
From: Benjamin R. <ben...@ou...> - 2014-10-21 18:37:33
|
Well, the first part is easy... it is called twinx(). If you look up axis twinning in the documentation, you will find a lot of examples of this. As for the grids part... that would be tricky. I would first just see if matplotlib "just does the right thing". Doubtful, but who knows? Then I would likely go the route of lining up the major ticks on both axes so that the grid lines for one axes match up with the ticks for the other. Let us know what you find out. Maybe it might be a useful feature to add for twinning. Cheers! Ben Root On Tue, Oct 21, 2014 at 2:29 PM, Neal Becker <ndb...@gm...> wrote: > I need to overlay 2 different plots. They will share an x-axis, but will > have 2 > different y axis with 2 different sets of units. I want one y-axis on > left and > one on right. > > But to make it harder, I want a grid. That means, there are either 2 > different > grids, which is ugly, or one plot has to be scaled vertically so that the > same y > grid can be shared between them. > > Anyone know how to do this? > > -- > -- Those who don't understand recursion are doomed to repeat it > > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Neal B. <ndb...@gm...> - 2014-10-21 18:29:23
|
I need to overlay 2 different plots. They will share an x-axis, but will have 2 different y axis with 2 different sets of units. I want one y-axis on left and one on right. But to make it harder, I want a grid. That means, there are either 2 different grids, which is ugly, or one plot has to be scaled vertically so that the same y grid can be shared between them. Anyone know how to do this? -- -- Those who don't understand recursion are doomed to repeat it |
From: Benjamin R. <ben...@ou...> - 2014-10-20 15:11:46
|
Legends entries are blindly constructed. Each plotting call that has a legend keyword argument will produce a legend entry if you are automatically building the legend. You can pass a label value of "__nolabel__" to prevent an entry if you know you are about to do something that would duplicate the entries. Another approach is to manually collect unique artists and manually build the legend (I think there is an example of that in the gallary). As for configuring the legend, there are a bunch of parameters that can be set for sizing the font. I think the sizing of the marker is determined by their size in the plot, though. Cheers! Ben Root On Mon, Oct 20, 2014 at 10:46 AM, Hearne, Mike <mh...@us...> wrote: > For your first question: Use the legend "numpoints" keyword. I think > if you set it to 1, it should solve that problem. > > For your second question, I'm not sure, but I'll bet if you poke > around in the Legend object returned by the function, you'll find > something. > > On Mon, Oct 20, 2014 at 8:04 AM, Tommy Carstensen > <tom...@gm...> wrote: > > How does one avoid duplicate legends? > > > www.tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg > > > > Can I make the legend size smaller than the marker size? > > > > > ------------------------------------------------------------------------------ > > Comprehensive Server Monitoring with Site24x7. > > Monitor 10 servers for $9/Month. > > Get alerted through email, SMS, voice calls or mobile push notifications. > > Take corrective actions from your mobile device. > > http://p.sf.net/sfu/Zoho > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Hearne, M. <mh...@us...> - 2014-10-20 14:58:41
|
For your first question: Use the legend "numpoints" keyword. I think if you set it to 1, it should solve that problem. For your second question, I'm not sure, but I'll bet if you poke around in the Legend object returned by the function, you'll find something. On Mon, Oct 20, 2014 at 8:04 AM, Tommy Carstensen <tom...@gm...> wrote: > How does one avoid duplicate legends? > www.tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg > > Can I make the legend size smaller than the marker size? > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Fabrice S. <si...@lm...> - 2014-10-20 14:40:25
|
Le lundi 20 octobre 2014 à 06:59 -0700, Tommy Carstensen a écrit : > Does anyone know, how they were able to add the legend titles "damped" > and "oscillatory" to this plot: > http://matplotlib.org/examples/pylab_examples/legend_demo.html Hi, it seems to me that you are looking to some deprecated example, not even listed in the page : http://matplotlib.org/examples/pylab_examples/ It has been rewritten as http://matplotlib.org/examples/pylab_examples/legend_demo2.html http://matplotlib.org/examples/pylab_examples/legend_demo3.html http://matplotlib.org/examples/pylab_examples/legend_demo4.html > Can anyone point me to a good tutorial on matplotlib legends? This one > is somewhat limited: > http://matplotlib.org/users/legend_guide.html I find it pretty concise and understandable... Have you seen the list of examples involving legend at the bottom of that page? |
From: Marcel M. <mar...@gm...> - 2014-10-20 14:13:01
|
Indeed, the legends showing in that figure should be 'Model length', 'Data length' and 'Total message length', which were the labels given to each plot command. Maybe there was a mismatch between code and plot there. 2014-10-20 11:59 GMT-02:00 Tommy Carstensen <tom...@gm...>: > Does anyone know, how they were able to add the legend titles "damped" > and "oscillatory" to this plot: > http://matplotlib.org/examples/pylab_examples/legend_demo.html > > Can anyone point me to a good tutorial on matplotlib legends? This one > is somewhat limited: > http://matplotlib.org/users/legend_guide.html > > Thanks. > > > ------------------------------------------------------------------------------ > Comprehensive Server Monitoring with Site24x7. > Monitor 10 servers for $9/Month. > Get alerted through email, SMS, voice calls or mobile push notifications. > Take corrective actions from your mobile device. > http://p.sf.net/sfu/Zoho > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Tommy C. <tom...@gm...> - 2014-10-20 14:04:53
|
How does one avoid duplicate legends? www.tommycarstensen.com/python2_matplotlib_basemap_merc_bluemarble_hresolution.jpg Can I make the legend size smaller than the marker size? |
From: Tommy C. <tom...@gm...> - 2014-10-20 14:00:05
|
Does anyone know, how they were able to add the legend titles "damped" and "oscillatory" to this plot: http://matplotlib.org/examples/pylab_examples/legend_demo.html Can anyone point me to a good tutorial on matplotlib legends? This one is somewhat limited: http://matplotlib.org/users/legend_guide.html Thanks. |
From: Tommy C. <tom...@gm...> - 2014-10-20 11:41:43
|
Here is a more detailed crash report in addition to the one from the command line: Application Specific Information: Assertion failed: (0), function query, file AbstractSTRtree.cpp, line 285. Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff93f2e866 __pthread_kill + 10 1 libsystem_pthread.dylib 0x00007fff9a44035c pthread_kill + 92 2 libsystem_c.dylib 0x00007fff935bfb1a abort + 125 3 libsystem_c.dylib 0x00007fff935899bf __assert_rtn + 321 4 libgeos-3.4.2.dylib 0x0000000105df3e6b geos::index::strtree::AbstractSTRtree::query(void const*, geos::index::strtree::AbstractNode const*, std::__1::vector<void*, std::__1::allocator<void*> >*) + 363 5 libgeos-3.4.2.dylib 0x0000000105e09c4d geos::noding::MCIndexNoder::intersectChains() + 173 6 libgeos-3.4.2.dylib 0x0000000105e10514 geos::operation::buffer::BufferBuilder::computeNodedEdges(std::__1::vector<geos::noding::SegmentString*, std::__1::allocator<geos::noding::SegmentString*> >&, geos::geom::PrecisionModel const*) + 50 7 libgeos-3.4.2.dylib 0x0000000105e10028 geos::operation::buffer::BufferBuilder::buffer(geos::geom::Geometry const*, double) + 170 8 libgeos-3.4.2.dylib 0x0000000105e11e84 geos::operation::buffer::BufferOp::bufferOriginalPrecision() + 178 9 libgeos-3.4.2.dylib 0x0000000105e11d94 geos::operation::buffer::BufferOp::computeGeometry() + 14 10 libgeos-3.4.2.dylib 0x0000000105e11d35 geos::operation::buffer::BufferOp::bufferOp(geos::geom::Geometry const*, double, int, int) + 79 11 libgeos_c.1.dylib 0x0000000105ba8f9f GEOSBuffer_r + 42 12 _geoslib.so 0x00000001056ee0ac __pyx_pw_8_geoslib_12BaseGeometry_11fix + 28 (_geoslib.c:1990) 13 org.python.python 0x00000001000e5496 PyEval_EvalFrameEx + 31398 14 org.python.python 0x00000001000e665d PyEval_EvalCodeEx + 2349 15 org.python.python 0x00000001000e51f7 PyEval_EvalFrameEx + 30727 16 org.python.python 0x00000001000e665d PyEval_EvalCodeEx + 2349 17 org.python.python 0x000000010003f76a function_call + 186 18 org.python.python 0x000000010000da08 PyObject_Call + 104 19 org.python.python 0x000000010002941c method_call + 140 20 org.python.python 0x000000010000da08 PyObject_Call + 104 21 org.python.python 0x0000000100078651 slot_tp_init + 81 22 org.python.python 0x00000001000736c4 type_call + 212 23 org.python.python 0x000000010000da08 PyObject_Call + 104 24 org.python.python 0x00000001000e1c3f PyEval_EvalFrameEx + 16975 25 org.python.python 0x00000001000e665d PyEval_EvalCodeEx + 2349 26 org.python.python 0x00000001000e671f PyEval_EvalCode + 63 27 org.python.python 0x0000000100110b2e PyRun_FileExFlags + 206 28 org.python.python 0x0000000100110edd PyRun_SimpleFileExFlags + 717 29 org.python.python 0x000000010012856e Py_Main + 3262 30 org.python.python 0x0000000100000e32 0x100000000 + 3634 31 org.python.python 0x0000000100000c84 0x100000000 + 3204 On Fri, Oct 17, 2014 at 3:57 AM, Tommy Carstensen <tom...@gm...> wrote: > To matplotlib-users, > > I ran the installation guide here on Mac OS: > http://matplotlib.org/basemap/users/installing.html > > Except I did brew install geos and subsequently did: > export DYLD_LIBRARY_PATH=/Users/tc9/homebrew/lib > export GEOS_LIBRARY_PATH=/Users/tc9/homebrew/Cellar/geos/3.4.2 > export GEOS_DIR=/Users/tc9/homebrew/Cellar/geos/3.4.2 > > And instead of python setup.py install I did: > /usr/local/bin/python3 setup.py install --user > > I got this warning: > /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/distutils/dist.py:260: > UserWarning: Unknown distribution option: 'namespace_packages' > warnings.warn(msg) > > When I try to run simpletest.py in the folder examples with > /usr/local/bin/python3 I get this error: > Assertion failed: (0), function query, file AbstractSTRtree.cpp, line 285. > Abort trap: 6 > > What am I doing wrong? > > Thanks, > Tommy |
From: Gaute H. <eg...@ga...> - 2014-10-20 08:22:18
|
Hi Bill, I've created a class for using the IBCAO with Basemap in the _Arctic_ that might be useful for you, it is located here: http://scipy-central.org/item/75/0/ibcao-international-bathymetric-chart-of-the-arctic-ocean-class-for-python-and-scipy ( https://github.com/gauteh/ibcao_py ) Cheers, Gaute Excerpts from Bill Wang's message of October 20, 2014 9:48: > Hi all! I've tried to plot some (sea ice thickness, snow freeboard > etc.) netcdf-data on Antarctic waters but there seems to be something > funny here since the plot is kind of cut in half or something. from > Scientific.IO.NetCDF import NetCDFFile # Also numpy as np, Basemap > etc, matplotlib as plt. F = NetCDFFile('data.nc','r')lat = > F.variables['nav_lat'][:,0]lon = F.variables['nev_lon'][0,:]data = > np.ma.masked_where(np.isnan(F.variables['iice_hid'][0,2,:,:]), > F.variables['iice_hid'][0,2,:,:])m = > Basemap(projection='spaeqd',boundinglat=-50,lon_0=180,resolution='l')lons, > lats = np.meshgrid(lon,lat)fig = > plt.figure()m.pcolormesh(lons,lats,data,latlon=True,vmin=0,vmax=2.3)m2.drawcoastlines()plt.show() > > > Unfortunately I can't provide any data, but the dimensions are:x=1442; > y=1021; icethi(=layers)=5; time_counter=1Longitudes are like (y,x), in > degrees_east, min -180 and max 180Latitudes are (y,x), in > degrees_north, min -77, max 89Data (the one to draw) is > (time_counter,icethi,y,x). Without meshgrid there is a RuntimeError: > Buffer lengths not the same. Also I've tried many other projections > like spstere, laea,splaea... With addcyclic the result looks exactly > the same so that can't be the problem either. The netcdf file doesn't > contain any more information about coordinate systems or projection, > just that lon and lat model is in "Default grid" what ever that means. > I would be very thankful if anyone can help me or give me a glue, from > where to look for a solution Cheers, Bill! |
From: Bill W. <bil...@ho...> - 2014-10-20 07:49:03
|
Hi all! I've tried to plot some (sea ice thickness, snow freeboard etc.) netcdf-data on Antarctic waters but there seems to be something funny here since the plot is kind of cut in half or something. from Scientific.IO.NetCDF import NetCDFFile # Also numpy as np, Basemap etc, matplotlib as plt. F = NetCDFFile('data.nc','r')lat = F.variables['nav_lat'][:,0]lon = F.variables['nev_lon'][0,:]data = np.ma.masked_where(np.isnan(F.variables['iice_hid'][0,2,:,:]), F.variables['iice_hid'][0,2,:,:])m = Basemap(projection='spaeqd',boundinglat=-50,lon_0=180,resolution='l')lons, lats = np.meshgrid(lon,lat)fig = plt.figure()m.pcolormesh(lons,lats,data,latlon=True,vmin=0,vmax=2.3)m2.drawcoastlines()plt.show() Unfortunately I can't provide any data, but the dimensions are:x=1442; y=1021; icethi(=layers)=5; time_counter=1Longitudes are like (y,x), in degrees_east, min -180 and max 180Latitudes are (y,x), in degrees_north, min -77, max 89Data (the one to draw) is (time_counter,icethi,y,x). Without meshgrid there is a RuntimeError: Buffer lengths not the same. Also I've tried many other projections like spstere, laea,splaea... With addcyclic the result looks exactly the same so that can't be the problem either. The netcdf file doesn't contain any more information about coordinate systems or projection, just that lon and lat model is in "Default grid" what ever that means. I would be very thankful if anyone can help me or give me a glue, from where to look for a solution Cheers, Bill! |
From: Nils W. <ni...@go...> - 2014-10-19 08:03:56
|
Hi all, here is a new build problem /usr/include/libpng12/pngconf.h:371:12: error: ‘__pngconf’ does not name a type /usr/include/libpng12/pngconf.h:372:12: error: ‘__dont__’ does not name a type error: command '/usr/bin/gcc' failed with exit status 1 Now I am using commit 5b398e95454ba9cc6dfad866ff7bc22b41ad7a68 Merge: e1702c7 ec2aff4 Author: Thomas A Caswell <tca...@gm...> Nils |