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
(10) |
2
(6) |
3
(1) |
4
(4) |
5
(11) |
6
(19) |
7
(18) |
8
(7) |
9
(9) |
10
(4) |
11
(3) |
12
(5) |
13
(19) |
14
(13) |
15
(21) |
16
(4) |
17
|
18
(5) |
19
(9) |
20
(13) |
21
(7) |
22
|
23
(1) |
24
(3) |
25
|
26
(3) |
27
(1) |
28
(2) |
29
(6) |
30
(5) |
31
|
>>> Benjamin Root 12/07/11 4:16 AM >>> > > Use draw_idle() if performance is an issue. Also, you don't have to redraw > everything. You can save the object returned by avline() > and in subsequent draws, just modify the data. Usually, there is a set_data() > or a set_xy() method you can use for this. I didn't find those methods for the axvline. I thought it would have them like other Line2D objects. This now works, though it sometimes creates ghost double lines, and isn't the most performant solution: def update_marker(self, event): print "plotMarker() pos = ", event.xdata # DEBUG self.marker=self.ax1 #print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%( # event.button, event.x, event.y, event.xdata, event.ydata) # DEBUG # Create markers (vertical lines) in both plots self.marker=self.ax1.axvline(x=event.xdata, linewidth=1.5, color='r') self.marker=self.ax2.axvline(x=event.xdata, linewidth=1.5, color='r') # We need to remove all unnecessary marker in plot 1 and plot 2 # TODO: find better method, keeps double marker sometimes for i in range(1, len(self.ax1.lines)-1): self.ax1.lines[i].remove() for i in range(1, len(self.ax2.lines)-1): self.ax2.lines[i].remove() self.marker=self.ax1.axvline(x=event.xdata, linewidth=1.5, color='r') self.marker=self.ax1.axvline(x=event.xdata, linewidth=1.5, color='r') self.canvas.draw_idle() Thanks for the help. Cheers, Sven
On Tuesday, December 6, 2011, questions anon <que...@gm...> wrote: > I would like to draw a simple circle around a specified latitude and longitude but I cannot find an appropriate command. > I have tried using > map.drawgreatcircle(myLON, myLAT,myLON, myLAT, linewidth=20,color='k') > but this doesn't do anything > or even > map.drawgreatcircle(myLON+1, myLAT+1,myLON-1, myLAT-1, linewidth=2,color='k') > and this appears to draw a line. > Any other commands I could try for this? > thanks in advance > drawgreatcircle() doesn't actually draw a circle, but rather an arc that represents the shortest distance between two points on the globe. Maybe you would rather use a Circle object? Ben Root
On Tuesday, December 6, 2011, Sven Duscha <du...@as...> wrote: > Hi, > > > I kind of got the basic functionality working using > > > cid = self.fig.canvas.mpl_connect('motion_notify_event', > self.update_marker) > > > def update_marker(self, event): > print "plotMarker()" # DEBUG > self.marker=self.ax1 > > #print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%( > # event.button, event.x, event.y, event.xdata, event.ydata) > # DEBUG > > self.ax1.axvline(x=event.xdata, linewidth=1, color='r') > self.canvas.draw() # redraw > > > > > > but I still have the problem that previous lines still appear on the > plot. > > > Also, canvas.draw() seems to be a bit of a performance hog. Does anyone > have > any more sophisticated solution to this? > > > Cheers, > > > Sven > Use draw_idle() if performance is an issue. Also, you don't have to redraw everything. You can save the object returned by avline() and in subsequent draws, just modify the data. Usually, there is a set_data() or a set_xy() method you can use for this. Ben Root
Hi, I kind of got the basic functionality working using cid = self.fig.canvas.mpl_connect('motion_notify_event', self.update_marker) def update_marker(self, event): print "plotMarker()" # DEBUG self.marker=self.ax1 #print 'button=%d, x=%d, y=%d, xdata=%f, ydata=%f'%( # event.button, event.x, event.y, event.xdata, event.ydata) # DEBUG self.ax1.axvline(x=event.xdata, linewidth=1, color='r') self.canvas.draw() # redraw but I still have the problem that previous lines still appear on the plot. Also, canvas.draw() seems to be a bit of a performance hog. Does anyone have any more sophisticated solution to this? Cheers, Sven
I would like to draw a simple circle around a specified latitude and longitude but I cannot find an appropriate command. I have tried using map.drawgreatcircle(myLON, myLAT,myLON, myLAT, linewidth=20,color='k') but this doesn't do anything or even map.drawgreatcircle(myLON+1, myLAT+1,myLON-1, myLAT-1, linewidth=2,color='k') and this appears to draw a line. Any other commands I could try for this? thanks in advance
Hi, how could I realize a moving marker line under the mouse pointer? I know about event handling http://matplotlib.sourceforge.net/users/event_handling.html and would use ‘ axes_enter_event’ to react on, then draw a line with axvline(x=event.xdata, linewidth=1, color='r') but how can I delete the line again without deleting my whole plot I have on that axes/subplot? Also I didn't see any "mouse move" event that would recognize a change in cursor position? Or is that what is meant with 'motion_notify_event'? If that is so, it comes down to know how to delete a vertical line on a mouse_notify_event. Is there a way to get a (named) list of plots on a particular subplot? In a different context I tried to keep my on list in a python self.axes list, but that was very tedious and I didn't finish it to work properly. Cheers, Sven
>>> Sven Duscha 12/06/11 4:50 PM >>> On Dec 6, 2011, at 4:34 PM, Till Stensitzki wrote: > I think you have to plot something, else matplotlib don't know where to draw the > ticks. Thankfully that got solved; I had an additional self.ax1.get_xaxis().set_visible(False) somewhere in my code. Got a bit too convoluted. Cheers, Sven -- Sven Duscha ASTRON P.O. Box 2 7990 AA, Dwingeloo, The Netherlands Phone: +31 521 595 241 Email: du...@as...
On 12/06/2011 12:43 AM, Arnaud wrote: > Hello, and thank you for this answer. > > I do not care that much of the colorbar, i added it to make sure the > range actually started at 0. > I used the contour function to that purpose too i.e. to show that my > function actally ranged from 0 to 100. > > Removing both colorbar and contour, i have the same result. > > I finally found a solution to this : i changed the backend > in .matplotlibrc from GTK to GTKAgg, and it works. That's why the plot looked OK to me, except for the odd colorbar; it never would have occurred to me that you might be using the gtk backend. The GTK backend is only partially functional, and I don't think it will ever go beyond that. I think we should simply deprecate and then remove it so as to avoid the sort of puzzle you encountered. Eric > > thanks again for answering! > best
You're not crazy. The v1.1.x branch got inadvertently moved to master yesterday. On the v1.1.x branch this fix is not applied. I will do so now. Mike On 12/05/2011 05:46 PM, Benjamin Root wrote: > Heh, strange... I could have sworn that the reference counter > decrements were there... Ok, looks like everything is where it should > be, I guess. > > Ben Root > > On Mon, Dec 5, 2011 at 1:44 PM, Michael Droettboom <md...@st... > <mailto:md...@st...>> wrote: > > It looks like this is already on 1.1.x, but not in the 1.1.0 > release. Or am I missing something? > > Mike > > > On 12/01/2011 12:24 PM, Benjamin Root wrote: >> On Thu, Dec 1, 2011 at 10:14 AM, Benjamin Root <ben...@ou... >> <mailto:ben...@ou...>> wrote: >> >> On Thu, Dec 1, 2011 at 9:29 AM, Neilen Marais >> <nm...@sk... <mailto:nm...@sk...>> wrote: >> >> https://github.com/matplotlib/matplotlib/commit >> /98ee4e991ae142622f3814db193b75236eb77cea#src/ft2font.cpp >> >> >> Hmm, strange... >> >> It isn't even in master right now. The last changes to it >> were by Michael Droettboom (commit 6b643862) in June of 2010, >> but the commit you are pointing to was done in March of >> 2011... this needs more investigating. >> >> Ben Root >> >> >> Strange, I could have sworn that I rebased my master branch >> correctly. Now, the fix is showing in master. Well, now that >> that has been resolved, I guess we can just simply cherry-pick >> that commit into v1.1.x? >> >> Ben Root >> >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure >> contains a definitive record of customers, application performance, >> security threats, fraudulent activity, and more. Splunk takes this >> data and makes sense of it. IT sense. And common sense. >> http://p.sf.net/sfu/splunk-novd2d >> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... <mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA
Benjamin Root <ben...@ou...> writes: > Confirmed. This seems to be a bug, but a quick glance at hist() doesn't > make it obvious to me what the cause is. Perhaps it is in bar()? > > Leo, could you please file a bug report on github? Done. -- Leo Breebaart <le...@ls...>
On Tue, Dec 6, 2011 at 11:15 AM, Arnaud <arn...@rh...>wrote: > thanks, of course, this work. > I will have to edit ticks labels ... > > shall we expect a correction in near future ? > It is doubtful unless I have some sort of eureka moment. I have been tinkering with this problem on-and-off for a few months now and haven't figure out a solution that doesn't require a complete revamp of the mplot3d module and matplotlib's projection module. Ben Root
On Mon, Dec 5, 2011 at 10:09 AM, JASON TILLEY <jdt...@ao...> wrote: > I am trying to put two regression lines on one scatter plot, but the > dashes on the lines are inconsistent. I get different length dashes in > different spots, and this won't be acceptable for publication I imagine. Do > you have nay idea of what could be causing this? I've thought it could be > related to the backend but all of them seem to produce the same result. > Thanks. > > Jason > Jason, Could you please include an image for us to see? It would also be useful to know which version of matplotlib you are using and also any relevant source code. Ben Root
thanks, of course, this work. I will have to edit ticks labels ... shall we expect a correction in near future ? best, -- RHENOVIA - Arnaud LEGENDRE. Le mardi 06 décembre 2011 à 10:45 -0600, Benjamin Root a écrit : > On Tue, Dec 6, 2011 at 10:08 AM, Arnaud <arn...@rh...> > wrote: > Hello, > > i encountered a problem when trying to set axes as logarithmic > in a 3D > plot using plot_surface(). > > I do not know if it is a known bug or if it is a > workaround ...? > > Yes, this is a known bug and it is a very tricky one to untangle. My > only suggestion is to plot the function using linearized log values. > So, maybe something like this: > > #!/usr/bin/python > import os > import sys > from pylab import * > from mpl_toolkits.mplot3d import Axes3D > from mpl_toolkits.mplot3d import axes3d > import numpy as np > # parameters we bach on > X = np.log10(np.arange(0.1, 20, 0.5)) > Y = np.log10(np.arange(0.1, 20, 0.5)) > X, Y = np.meshgrid(X, Y) > R = np.sqrt((10**X-10)**2 + (10**Y-10)**2) > Z = np.sin(R) > > fig = figure(num=None, figsize=(6, 6), dpi=80, facecolor='#F2F2F2', > edgecolor='k') > ax = subplot(111,projection='3d') > ax.plot_surface(X,Y,Z, rstride=1, cstride=1, cmap=cm.jet, > linewidths=.5) > > show() > > Now, that won't make the points evenly spaced, so you might want to do > something like the following: > > X = np.log10(np.logspace(-1, 1.3, 40)) > > I hope that helps! > Ben Root >
On Tue, Dec 6, 2011 at 10:08 AM, Arnaud <arn...@rh...>wrote: > Hello, > > i encountered a problem when trying to set axes as logarithmic in a 3D > plot using plot_surface(). > > I do not know if it is a known bug or if it is a workaround ...? > Yes, this is a known bug and it is a very tricky one to untangle. My only suggestion is to plot the function using linearized log values. So, maybe something like this: #!/usr/bin/python import os import sys from pylab import * from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d import axes3d import numpy as np # parameters we bach on X = np.log10(np.arange(0.1, 20, 0.5)) Y = np.log10(np.arange(0.1, 20, 0.5)) X, Y = np.meshgrid(X, Y) R = np.sqrt((10**X-10)**2 + (10**Y-10)**2) Z = np.sin(R) fig = figure(num=None, figsize=(6, 6), dpi=80, facecolor='#F2F2F2', edgecolor='k') ax = subplot(111,projection='3d') ax.plot_surface(X,Y,Z, rstride=1, cstride=1, cmap=cm.jet, linewidths=.5) show() Now, that won't make the points evenly spaced, so you might want to do something like the following: X = np.log10(np.logspace(-1, 1.3, 40)) I hope that helps! Ben Root
Hello, i encountered a problem when trying to set axes as logarithmic in a 3D plot using plot_surface(). I do not know if it is a known bug or if it is a workaround ...? the failing code is : #!/usr/bin/python import os import sys from pylab import * from mpl_toolkits.mplot3d import Axes3D from mpl_toolkits.mplot3d import axes3d import numpy as np # parameters we bach on X = np.arange(0.1, 20, 0.5) Y = np.arange(0.1, 20, 0.5) X, Y = np.meshgrid(X, Y) R = np.sqrt((X-10)**2 + (Y-10)**2) Z = np.sin(R) fig = figure(num=None, figsize=(6, 6), dpi=80, facecolor='#F2F2F2', edgecolor='k') ax = subplot(111,projection='3d') # the two following make the plot fail #ax.set_yscale('log') ax.set_xscale('log') ax.plot_surface(X,Y,Z, rstride=1, cstride=1, cmap=cm.jet, linewidths=.5) show() and the complete output is : Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py", line 395, in expose_event self._render_figure(self._pixmap, w, h) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gtkagg.py", line 75, in _render_figure FigureCanvasAgg.draw(self) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 401, in draw self.figure.draw(self.renderer) File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/figure.py", line 884, in draw func(*args) File "/usr/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 210, in draw ax.draw(renderer) File "/usr/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axis3d.py", line 393, in draw tick.draw(renderer) File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/axis.py", line 234, in draw self.label1.draw(renderer) File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/text.py", line 591, in draw ismath=ismath) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 142, in draw_text return self.draw_mathtext(gc, x, y, s, prop, angle) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 131, in draw_mathtext x = int(x) + ox File "/usr/local/lib/python2.7/site-packages/numpy/ma/core.py", line 3795, in __int__ raise MaskError, 'Cannot convert masked element to a Python int.' numpy.ma.core.MaskError: Cannot convert masked element to a Python int. Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py", line 395, in expose_event self._render_figure(self._pixmap, w, h) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_gtkagg.py", line 75, in _render_figure FigureCanvasAgg.draw(self) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 401, in draw self.figure.draw(self.renderer) File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/figure.py", line 884, in draw func(*args) File "/usr/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axes3d.py", line 210, in draw ax.draw(renderer) File "/usr/local/lib/python2.7/site-packages/mpl_toolkits/mplot3d/axis3d.py", line 393, in draw tick.draw(renderer) File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/axis.py", line 234, in draw self.label1.draw(renderer) File "/usr/local/lib/python2.7/site-packages/matplotlib/artist.py", line 55, in draw_wrapper draw(artist, renderer, *args, **kwargs) File "/usr/local/lib/python2.7/site-packages/matplotlib/text.py", line 591, in draw ismath=ismath) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 142, in draw_text return self.draw_mathtext(gc, x, y, s, prop, angle) File "/usr/local/lib/python2.7/site-packages/matplotlib/backends/backend_agg.py", line 131, in draw_mathtext x = int(x) + ox File "/usr/local/lib/python2.7/site-packages/numpy/ma/core.py", line 3795, in __int__ raise MaskError, 'Cannot convert masked element to a Python int.' numpy.ma.core.MaskError: Cannot convert masked element to a Python int. any insight will be welcomed ! Thanks -- RHENOVIA - Arnaud LEGENDRE.
On Tue, Dec 6, 2011 at 6:56 AM, Leo Breebaart <le...@ls...> wrote: > fig = plt.figure() > ax = fig.add_subplot(111) > # Plot as expected: single bar in the center: > #result = ax.hist([1.0e+14], 5) > # Plot remains completely empty: > result = ax.hist([1.0e+16], 5) > print "result:", result > plt.show() > Confirmed. This seems to be a bug, but a quick glance at hist() doesn't make it obvious to me what the cause is. Perhaps it is in bar()? Leo, could you please file a bug report on github? Thanks, Ben Root
On Dec 6, 2011, at 4:34 PM, Till Stensitzki wrote: > I think you have to plot something, else matplotlib don't know where to draw the > ticks. I do plot data, both with .scatter and .plot. The data is plotted perfectly fine, just without any xaxis marks. The whole source code of the application is a bit overwhelming to be completely posted on the mailing list. Cheers, Sven -- Sven Duscha ASTRON P.O. Box 2 7990 AA, Dwingeloo, The Netherlands Phone: +31 521 595 241 Email: du...@as...
I think you have to plot something, else matplotlib don't know where to draw the ticks.
From: Michael Droettboom <md...@st...> > > To: mat...@li... > > Subject: Re: [Matplotlib-users] how to use different font for serif > > Date: Mon, 5 Dec 2011 14:49:09 -0500 > > > > What rcParams are you setting? > > > > font.family: serif > > font.serif: Times New Roman > > > > and > > > > font.family: Times New Roman > > > > both work for me. > > > > You have to use the name of the font as specified in the file, not > > the filename to specify the font (which is probably why "times" is > > not working for you). > > > > Mike I tried both of those and just tried them again and neither work for me: In [2]: rcParams['font.family'] = 'serif' In [3]: rcParams['font.serif'] = ['Times New Roman'] In [4]: plot([0,1,2]) Out[4]: [<matplotlib.lines.Line2D object at 0x62d69d0>] In [5]: /usr/local/lib/python2.6/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['serif'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) In [7]: rcParams['font.family'] = 'Times New Roman' In [8]: plot([0,1,2]) Out[8]: [<matplotlib.lines.Line2D object at 0x62ff210>] In [9]: /usr/local/lib/python2.6/site-packages/matplotlib/font_manager.py:1242: UserWarning: findfont: Font family ['Times New Roman'] not found. Falling back to Bitstream Vera Sans (prop.get_family(), self.defaultFamily[fontext])) What is it that tells the font_manager where to look? Jon
David Belohrad <david.belohrad@...> writes: > This leads me to a conclusion, that matplotlib somehow 'chooses' the > data to be displayed. > > How can I force it to display all the data? I do not mind if not all the > data are displayed in the graph, but it seems that it does not bother to > skip as well the peaks, which are of utmost importance... > > any help appreciated. > This looks like a old matplotlib bug, where the path simplification didnt work right, so maybe updating your matplotlib version would help. I think you can set path.simplify to false in your matplotlib rc.
Hi all, It would appear that Axes.hist() does not handle large input values the way I was expecting it to. For example: ----------------------------------------------------------------- import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) # Plot as expected: single bar in the center: #result = ax.hist([1.0e+14], 5) # Plot remains completely empty: result = ax.hist([1.0e+16], 5) print "result:", result plt.show() ----------------------------------------------------------------- My hypothesis is that the large value in y is causing the bin interval size in x to become infinitesimally small, but is it conceptually wrong of me to expect a histogram for such large values to still work? If so, what would be a workaround? I don't control the data I am trying to plot, and sometimes there's yes, only a single value, and yes, it's that large... (All this is done with matplotlib 1.1.0 on Debian stable (v6.0.x) for Python 2.6.6. uname: Linux miranda 2.6.32-5-686 #1 SMP Mon Oct 3 04:15:24 UTC 2011 i686 GNU/Linux). Any help/advice will be much appreciated. -- Leo Breebaart <le...@ls...>
Hi, I am writing a small plotting GUI using Matplotlib 1.0.1 and QT4.6. Essentially I need interaction with the GUI, in order to sett plotted parameters and plotting limits. This means that I have to set up a figure in a canvas environment in order to use it in QT - at least that is what I gathered from my understanding: import matplotlib from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationToolbar from matplotlib.figure import Figure [...] # Create canvas for plotting self.fig = Figure((5, 4), dpi=100) self.canvas = FigureCanvas(self.fig) self.canvas.setParent(self) self.fig.subplots_adjust(left=self.rim, right=1.0-self.rim, top=1.0-self.rim, bottom=self.rim) # set a small rim Even setting explicitly the xticklabels does not bring them up. self.ax2.set_xticklabels(self.ax1.get_xticklabels(), visible=True) I had the impression that I might just not give enough space for them, because of the subplots_adjust function, but changing the available rim didn't help. Anyone having any ideas what could be going wrong? Or how I could simplify the matplotlib/QT integration? Cheers, Sven -- Sven Duscha ASTRON P.O. Box 2 7990 AA, Dwingeloo, The Netherlands Phone: +31 521 595 241 Email: du...@as...
Hello, and thank you for this answer. I do not care that much of the colorbar, i added it to make sure the range actually started at 0. I used the contour function to that purpose too i.e. to show that my function actally ranged from 0 to 100. Removing both colorbar and contour, i have the same result. I finally found a solution to this : i changed the backend in .matplotlibrc from GTK to GTKAgg, and it works. thanks again for answering! best -- RHENOVIA - Arnaud LEGENDRE. Le lundi 05 décembre 2011 à 20:04 -1000, Eric Firing a écrit : > On 12/05/2011 10:00 AM, Arnaud wrote: > > Hello, > > > > I am new to this list, but not totally to matplotlib. > > I installed v1.1.0 lately, and i noticed that something went wrong (or, > > not as before) with fcontour(). > > It looks like the range of colors used to fill in, is not set correctly. > > Sorry, i cannot really tel it better, but i have a piece of source code, > > that highlights the phenomenon : > > Try removing the call to contour; it is not doing you any good, at least > in this example. You are passing its ContourSet return object to your > colorbar call, so your colorbar is showing the contour lines, not the > continuous range of colors, which I think is what you want. > > You can show both contourf colors and contour lines on a colorbar, if > you do want that; see > http://matplotlib.sourceforge.net/examples/pylab_examples/contourf_demo.html > > Eric > > > > > #!/usr/bin/python > > import os > > import sys > > from pylab import * > > > > # parameters we bach on > > x = linspace(-10,10,30) > > y = linspace(-4,4,30) > > X,Y = meshgrid(x,y) > > F = 0.5*X**2 + (7*Y**2)/2 > > > > fig = figure(num=None, figsize=(6, 6), dpi=80, facecolor='#666666', > > edgecolor='k') > > > > ax = fig.gca() > > > > cmap=get_cmap('reds') > > plage = arange(0,100,1) > > surf = contourf(X,Y,F, plage) > > plage = arange(0,100,2) > > surf = contour(X,Y,F, plage, linewidths=2) > > > > ax.grid(True) > > fig.colorbar(surf, shrink=0.5, aspect=5) > > axis([x.min(),x.max(),y.min(),y.max()]) > > > > show() > > > > > > I ran it with pyV2.6/matplotlibV0.99.1, and it behaves differently with > > pyV2.7/matplotlibV1.1.0 . > > > > Could you confirm that on your computer, if this is an expected > > behaviour, and, if not, if you have an idea about how to fix it ? > > > > thanks a lot, > > Arnaud. > > > > > > > > > > ------------------------------------------------------------------------------ > > All the data continuously generated in your IT infrastructure > > contains a definitive record of customers, application performance, > > security threats, fraudulent activity, and more. Splunk takes this > > data and makes sense of it. IT sense. And common sense. > > http://p.sf.net/sfu/splunk-novd2d > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ------------------------------------------------------------------------------ > Cloud Services Checklist: Pricing and Packaging Optimization > This white paper is intended to serve as a reference, checklist and point of > discussion for anyone considering optimizing the pricing and packaging model > of a cloud services business. Read Now! > http://www.accelacomm.com/jaw/sfnl/114/51491232/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Dear All, I'm using matplotlib to generate graph from measured data in one of our accelerators. The issue I have, that the data vector is huge. We talk, say about 50000 points to be displayed in a single graph, and I have to assure, that those points are really there. Otherwise the image will be broken. Now, I did a plot like this one: http://svnweb.cern.ch/world/wsvn/fimdab/trunk/doc/broken_acquisitions/broken_picture.pdf The top-picture is somehow still correct, however bottom picture, which should display data on the sample x-axis places as top one, is evidently broken. The problem was traced somewhere into matplotlib, because the original data used to construct the graph are fine. Moreover, if I plot the same data, but just require different x-axis setting to 'zoom' on a part, e.g. 350-600 of the original image linked above, I get correct data output: http://svnweb.cern.ch/world/wsvn/fimdab/trunk/doc/broken_acquisitions/correct_picture.pdf This leads me to a conclusion, that matplotlib somehow 'chooses' the data to be displayed. How can I force it to display all the data? I do not mind if not all the data are displayed in the graph, but it seems that it does not bother to skip as well the peaks, which are of utmost importance... any help appreciated. The source code to display the graphs is shown in function writePdfBSlots in following code: http://svnweb.cern.ch/world/wsvn/fimdab/trunk/SW/Python/captTest.py thanks for any help david
On 12/05/2011 10:00 AM, Arnaud wrote: > Hello, > > I am new to this list, but not totally to matplotlib. > I installed v1.1.0 lately, and i noticed that something went wrong (or, > not as before) with fcontour(). > It looks like the range of colors used to fill in, is not set correctly. > Sorry, i cannot really tel it better, but i have a piece of source code, > that highlights the phenomenon : Try removing the call to contour; it is not doing you any good, at least in this example. You are passing its ContourSet return object to your colorbar call, so your colorbar is showing the contour lines, not the continuous range of colors, which I think is what you want. You can show both contourf colors and contour lines on a colorbar, if you do want that; see http://matplotlib.sourceforge.net/examples/pylab_examples/contourf_demo.html Eric > > #!/usr/bin/python > import os > import sys > from pylab import * > > # parameters we bach on > x = linspace(-10,10,30) > y = linspace(-4,4,30) > X,Y = meshgrid(x,y) > F = 0.5*X**2 + (7*Y**2)/2 > > fig = figure(num=None, figsize=(6, 6), dpi=80, facecolor='#666666', > edgecolor='k') > > ax = fig.gca() > > cmap=get_cmap('reds') > plage = arange(0,100,1) > surf = contourf(X,Y,F, plage) > plage = arange(0,100,2) > surf = contour(X,Y,F, plage, linewidths=2) > > ax.grid(True) > fig.colorbar(surf, shrink=0.5, aspect=5) > axis([x.min(),x.max(),y.min(),y.max()]) > > show() > > > I ran it with pyV2.6/matplotlibV0.99.1, and it behaves differently with > pyV2.7/matplotlibV1.1.0 . > > Could you confirm that on your computer, if this is an expected > behaviour, and, if not, if you have an idea about how to fix it ? > > thanks a lot, > Arnaud. > > > > > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users