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
(11) |
2
(24) |
3
(24) |
4
(31) |
5
(30) |
6
(27) |
7
(25) |
8
(8) |
9
(2) |
10
(12) |
11
(16) |
12
(33) |
13
(18) |
14
(17) |
15
(3) |
16
(7) |
17
(8) |
18
(22) |
19
(20) |
20
(25) |
21
(10) |
22
(17) |
23
(18) |
24
(23) |
25
(15) |
26
(19) |
27
(6) |
28
(7) |
29
(6) |
30
(1) |
31
(12) |
|
|
|
|
|
Hi Everyone, I need some advice on the best way to create a certain plot: I have a series of time points. For each one, I have a collection of values for which I'd like to display the distribution with a histogram. On the x-axis would be the time points, while at each time point there is a vertical line that is the baseline for a horizontally-oriented histogram. This is similar to a series of boxplots, but rather than using a boxplot to represent a distribution of points, I am using a histogram. There is no reason to represent the "counts" for each histogram, as the histograms would all be normalized, and I am only interested in their shape. Ideally, this plot would be created on a single Axes object, as there should be only a single x-axis. This would involve drawing lots of rectangles on a single plot. However, one alternative is to create a separate Axes for each histogram, and play with their relative sizes on the canvas to get the proper spacing of the timepoints. I have browsed the list of examples but was not able to find something similar. Any suggestions are welcome... Thanks! Uri -- Uri Laserson PhD Candidate, Biomedical Engineering Harvard Medical School (Genetics) Massachusetts Institute of Technology (Mathematics) phone +1 917 742 8019 las...@mi...
Hello, Could not get a legend shown on scatter function used plot: In [4]: a = rand(100) In [5]: b = rand(100) In [22]: scatter(a,b, c=a, s=b, label="aaaa") Out[22]: <matplotlib.collections.CircleCollection object at 0xa133dcc> In [23]: scatter(a,b, c=a*5, s=b*5, label="cccc") Out[23]: <matplotlib.collections.CircleCollection object at 0xa311e6c> In [24]: legend() at rev 7355. with Python 2.6 (r26:66714, Jun 8 2009) IPython 0.10.bzr.r1163 -- An enhanced Interactive Python. Any suggestions? -- Gökhan
On Tue, Aug 4, 2009 at 2:27 PM, Michael Droettboom <md...@st...> wrote: > > Gökhan Sever wrote: > >> >> I see a little change when I typed them in Ipython, however not exactly >> sure the real reasoning behind this. >> >> In [4]: lines = ax.plot(t, y1, lw=2, color='red', label='1 hz') >> >> In [5]: lines >> Out[5]: [<matplotlib.lines.Line2D object at 0xabce76c>] >> > Here the variable lines is a list with one element (a Line2D object). > >> >> In [6]: lines, = ax.plot(t, y1, lw=2, color='red', label='1 hz') >> >> In [7]: lines >> Out[7]: <matplotlib.lines.Line2D object at 0xabceaec> >> > Here lines is a Line2D object. > > ax.plot always returns a list because it may plot more than one line. The > choice of syntax for the caller of the function is just for convenience. > One could just as easily do: Yeah, it's a nice little feature of python: t = (1,2,3) x,y,z = t #Now: x=1, y=2, z=3 Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma Sent from Norman, Oklahoma, United States
I was wondering if anyone had any possible suggestions to fix the build problem I am having below. I built libpng as a universal library as described below. MPL then builds without any complaints, but gives me an import error related to libpng. I'm not a unix expert, and I'm not sure how to proceed. Thanks! Uri On Thu, Jul 30, 2009 at 01:34, Uri Laserson <las...@mi...> wrote: > The first suggestion failed with the same error, while the same suggestion > worked up through the last step (make installers) which fails with the same > error. > > I decided to try Tommy's suggestion of just figuring out how to compile > libpng as a universal binary. The way I did it was to run the configuration > script as: > > ./configure --disable-dependency-tracking > > > and then to manually edit the Makefile. To CPPFLAGS and LDFLAGS I added > > -arch i386 -arch ppc > > Running make and sudo make install successfully built a universal library > for me. > > After deleting my old MPL egg, I import matplotlib successfully and the > version number is as expected (0.98.6svn). > > However, when I try to import pyplot, I get the following exception > traceback. Any suggestions on how to fix this? > > Thanks again! > > In [4]: import matplotlib.pyplot as plt > --------------------------------------------------------------------------- > ImportError Traceback (most recent call last) > > /usr/local/lib/<ipython console> in <module>() > > /Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/pyplot.py > in <module>() > 4 from matplotlib import _pylab_helpers, interactive > 5 from matplotlib.cbook import dedent, silent_list, is_string_like, > is_numlike > ----> 6 from matplotlib.figure import Figure, figaspect > 7 from matplotlib.backend_bases import FigureCanvasBase > 8 from matplotlib.image import imread as _imread > > /Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/figure.py > in <module>() > 17 import artist > 18 from artist import Artist, allow_rasterization > ---> 19 from axes import Axes, SubplotBase, subplot_class_factory > 20 from cbook import flatten, allequal, Stack, iterable, dedent > 21 import _image > > /Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/axes.py > in <module>() > 17 import matplotlib.dates as mdates > 18 import matplotlib.font_manager as font_manager > ---> 19 import matplotlib.image as mimage > 20 import matplotlib.legend as mlegend > 21 import matplotlib.lines as mlines > > /Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/image.py > in <module>() > 19 # For clarity, names from _image are given explicitly in this > module: > 20 import matplotlib._image as _image > ---> 21 import matplotlib._png as _png > 22 > 23 # For user convenience, the names from _image are also imported > into > > ImportError: > dlopen(/Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/_png.so, > 2): Symbol not found: _png_create_info_struct > Referenced from: > /Library/Frameworks/Python.framework/Versions/4.0.30002/lib/python2.5/site-packages/matplotlib/_png.so > Expected in: /usr/local/lib/libpng12.0.dylib > > > > > On Wed, Jul 29, 2009 at 21:46, John Hunter <jd...@gm...> wrote: > >> On Wed, Jul 29, 2009 at 4:34 PM, Uri Laserson<las...@mi...> wrote: >> > Hi everyone, >> > >> > I am trying to build the latest svn trunk version of MPL on OS X 10.5. >> I am >> > getting the following error: >> >> Try >> >> make build_osx105 >> python setup.py install --prefix=~/somewhere >> >> If that doesn't work, try >> >> cd release/osx >> >> read the readme there and follow the instructions. This will build >> mpl the way we do when making a release: fetch the dependencies (zlip, >> png and freetype) and build them with the right flags, and then build >> mpl explcitly linking to these libs. >> >> JDH >> > > > > -- > Uri Laserson > PhD Candidate, Biomedical Engineering > Harvard Medical School (Genetics) > Massachusetts Institute of Technology (Mathematics) > phone +1 917 742 8019 > las...@mi... > -- Uri Laserson PhD Candidate, Biomedical Engineering Harvard Medical School (Genetics) Massachusetts Institute of Technology (Mathematics) phone +1 917 742 8019 las...@mi...
Gökhan Sever wrote: > > I see a little change when I typed them in Ipython, however not > exactly sure the real reasoning behind this. > > In [4]: lines = ax.plot(t, y1, lw=2, color='red', label='1 hz') > > In [5]: lines > Out[5]: [<matplotlib.lines.Line2D object at 0xabce76c>] Here the variable lines is a list with one element (a Line2D object). > > In [6]: lines, = ax.plot(t, y1, lw=2, color='red', label='1 hz') > > In [7]: lines > Out[7]: <matplotlib.lines.Line2D object at 0xabceaec> Here lines is a Line2D object. ax.plot always returns a list because it may plot more than one line. The choice of syntax for the caller of the function is just for convenience. One could just as easily do: lines = ax.plot(t, y1, lw=2, color='red', label='1 hz') line = lines[0] Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
On Tue, Aug 4, 2009 at 11:50 AM, John Hunter <jd...@gm...> wrote: > On Mon, Aug 3, 2009 at 11:38 PM, Gökhan Sever<gok...@gm...> > wrote: > > Hello, > > > > I was wondering if it is possible to hide some data on figures using a > say > > right click option to any of the legend entry and make it temporarily > > hidden/visible to better analyse the rest of the data? > > > > Check this screenshot for example: > > > > http://img25.imageshack.us/img25/9427/datahiding.png > > > > The red data clutters the rest of the figure, and I would like to be able > to > > hide it temporarily so that I can investigate the other two relations > more > > easily. > > > > Any ideas? or alternative solutions? > > It's a nice idea, and should be doable with the pick interface we have > for all mpl artists. Unfortunately, there were a few problems in the > legend implementation which blocked the pick events from hitting the > proxy lines they contained. I just made a few changes to mpl svn HEAD > to support this, and added a new example. > > examples/event_handling/legend_picking.py > > which I'll include below. JJ could you review the changes to legend.py? > > Instructions for checking out svn are at:: > > > http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn > > Here is the example: > > """ > Enable picking on the legend to toggle the legended line on and off > """ > import numpy as np > import matplotlib.pyplot as plt > > t = np.arange(0.0, 0.2, 0.1) > y1 = 2*np.sin(2*np.pi*t) > y2 = 4*np.sin(2*np.pi*2*t) > > fig = plt.figure() > ax = fig.add_subplot(111) > > line1, = ax.plot(t, y1, lw=2, color='red', label='1 hz') > line2, = ax.plot(t, y2, lw=2, color='blue', label='2 hz') > > leg = ax.legend(loc='upper left', fancybox=True, shadow=True) > leg.get_frame().set_alpha(0.4) > > > lines = [line1, line2] > lined = dict() > for legline, realine in zip(leg.get_lines(), lines): > legline.set_picker(5) # 5 pts tolerance > lined[legline] = realine > > def onpick(event): > legline = event.artist > realline = lined[legline] > vis = realline.get_visible() > realline.set_visible(not vis) > fig.canvas.draw() > > fig.canvas.mpl_connect('pick_event', onpick) > > plt.show() > Excellent John. Right what I was seeking for. This will help me a lot to view and analyze my crowded plots. Thanks also Ryan for the additional correction. I have a little question on the code: What is the purpose of using "commas" after line1 and line2 names? I see a little change when I typed them in Ipython, however not exactly sure the real reasoning behind this. In [4]: lines = ax.plot(t, y1, lw=2, color='red', label='1 hz') In [5]: lines Out[5]: [<matplotlib.lines.Line2D object at 0xabce76c>] In [6]: lines, = ax.plot(t, y1, lw=2, color='red', label='1 hz') In [7]: lines Out[7]: <matplotlib.lines.Line2D object at 0xabceaec> Thanks. -- Gökhan
Hello, First thanks for the great library, recently came across it and seems quite useful for what i'm doing. What i'm trying to do is create an animated specgram(). I'm feeding in audio data from a microphone at the moment, although the ultimate use is to chart data that will be input via the line in audio port from an FMCW radar front end for basic visualization. I've attached simplified code below based from one of your animation examples that shows my problem. Initially i get fine performance given the timeout i've set. After about a second or two, performance goes down hill and progressively gets worse and memory use continues to grow as if each call to specgram creates a new instance in memory or worse is drawing a new instance over the old. Is there another way to call specgram to avoid this? It seems the other plot types generally give the ability to update the data for an already created graph, i haven't seen a way to do this with specgram, perhaps this is what i'm missing? Ultimately i would like to get the graph image out of specgram and append them properly to get a smoother scrolling effect but i need to get the data out of specgram fast enough first. thanks in advance for any pointers. import gobject import numpy as np import matplotlib import array matplotlib.use('GTKAgg') import matplotlib.pyplot as plt import ossaudiodev as oss audio = oss.open('/dev/dsp','r') print audio.setfmt(oss.AFMT_S16_LE) print audio.channels(1) print audio.speed(44100) fig = plt.figure() ax = fig.add_subplot(111) data = array.array('H',audio.read(5880)) img = ax.specgram(data, NFFT=1024,Fs=44100, Fc=0,noverlap=64) def update(): data = array.array('H',audio.read(5880)) img = plt.specgram(data, NFFT=1024,Fs=44100, Fc=0,noverlap=64) fig.canvas.draw_idle() return True gobject.timeout_add(100, update) plt.show() -- View this message in context: http://www.nabble.com/Repeated-calls-to-Specgram-for-animation%2C-memory-leaking-tp24814391p24814391.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Tue, Aug 4, 2009 at 11:50 AM, John Hunter <jd...@gm...> wrote: > On Mon, Aug 3, 2009 at 11:38 PM, Gökhan Sever<gok...@gm...> > wrote: > > Hello, > > > > I was wondering if it is possible to hide some data on figures using a > say > > right click option to any of the legend entry and make it temporarily > > hidden/visible to better analyse the rest of the data? > > > > Check this screenshot for example: > > > > http://img25.imageshack.us/img25/9427/datahiding.png > > > > The red data clutters the rest of the figure, and I would like to be able > to > > hide it temporarily so that I can investigate the other two relations > more > > easily. > > > > Any ideas? or alternative solutions? > > It's a nice idea, and should be doable with the pick interface we have > for all mpl artists. Unfortunately, there were a few problems in the > legend implementation which blocked the pick events from hitting the > proxy lines they contained. I just made a few changes to mpl svn HEAD > to support this, and added a new example. > > examples/event_handling/legend_picking.py Awesome example. I tweaked it to change the alpha of the lines in the legend so that you know when you've turned off a line (making it more chaco-like). Ryan -- Ryan May Graduate Research Assistant School of Meteorology University of Oklahoma
Hello, In the following code (using matplotlib svn), I'm trying to set the left (log) axis "outward" using spines. Subplots 222 and 223 have "weird" behaviors. Am I using the API incorrectly? I got it to work by calling ax.set_yscale('log') twice (subplot 224). Where should I start if I want to contribute a patch? import matplotlib.pyplot as plt plt.rcParams["xtick.direction"] = "out" plt.rcParams["ytick.direction"] = "out" x = [.5, 111,68, 192, 340, 325] fig = plt.figure() ax = fig.add_subplot(221) ax.set_yscale('log') ax.bar(range(len(x)), x, align='center') ax = fig.add_subplot(222) ax.set_yscale('log') ax.bar(range(len(x)), x, align='center') ax.spines["left"].set_position(("outward", 10)) ax = fig.add_subplot(223) ax.bar(range(len(x)), x, align='center') ax.spines["left"].set_position(("outward", 10)) ax.set_yscale('log') ax = fig.add_subplot(224) ax.set_yscale('log') ax.bar(range(len(x)), x, align='center') ax.spines["left"].set_position(("outward", 10)) ax.set_yscale('log') plt.show() # EOF Thanks for your help. Best regards, -- Nicolas Pinto Ph.D. Candidate, Brain & Computer Sciences Massachusetts Institute of Technology, USA http://web.mit.edu/pinto
Just a quick note - the last script in my previous email is wrong. I don't get the problem in that case, I get it if the arrays are 32-bit: import matplotlib.pyplot as mpl import numpy as np np.random.seed(-12421412) x = np.random.random(10000).astype(np.float32) y = np.random.random(10000).astype(np.float32) c = np.random.random(10000).astype(np.float32) fig = mpl.figure() ax = fig.add_subplot(111) ax.scatter(x,y,c=c,alpha=0.01,cmap=mpl.cm.jet) fig.canvas.draw() which explains why there is probably some small numerical inaccuracy in deciding whether the color value is above the maximum of the range (if the latter is calculated in 64-bit). However, the question of why alpha gets set to 1 for color values above the maximum still holds. Tom -- View this message in context: http://www.nabble.com/bug-in-scatter--tp24811933p24812570.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Mon, Aug 3, 2009 at 11:38 PM, Gökhan Sever<gok...@gm...> wrote: > Hello, > > I was wondering if it is possible to hide some data on figures using a say > right click option to any of the legend entry and make it temporarily > hidden/visible to better analyse the rest of the data? > > Check this screenshot for example: > > http://img25.imageshack.us/img25/9427/datahiding.png > > The red data clutters the rest of the figure, and I would like to be able to > hide it temporarily so that I can investigate the other two relations more > easily. > > Any ideas? or alternative solutions? It's a nice idea, and should be doable with the pick interface we have for all mpl artists. Unfortunately, there were a few problems in the legend implementation which blocked the pick events from hitting the proxy lines they contained. I just made a few changes to mpl svn HEAD to support this, and added a new example. examples/event_handling/legend_picking.py which I'll include below. JJ could you review the changes to legend.py? Instructions for checking out svn are at:: http://matplotlib.sourceforge.net/faq/installing_faq.html#install-from-svn Here is the example: """ Enable picking on the legend to toggle the legended line on and off """ import numpy as np import matplotlib.pyplot as plt t = np.arange(0.0, 0.2, 0.1) y1 = 2*np.sin(2*np.pi*t) y2 = 4*np.sin(2*np.pi*2*t) fig = plt.figure() ax = fig.add_subplot(111) line1, = ax.plot(t, y1, lw=2, color='red', label='1 hz') line2, = ax.plot(t, y2, lw=2, color='blue', label='2 hz') leg = ax.legend(loc='upper left', fancybox=True, shadow=True) leg.get_frame().set_alpha(0.4) lines = [line1, line2] lined = dict() for legline, realine in zip(leg.get_lines(), lines): legline.set_picker(5) # 5 pts tolerance lined[legline] = realine def onpick(event): legline = event.artist realline = lined[legline] vis = realline.get_visible() realline.set_visible(not vis) fig.canvas.draw() fig.canvas.mpl_connect('pick_event', onpick) plt.show()
Hi, The following script produces a single point that is green and translucent: import matplotlib.pyplot as mpl fig = mpl.figure() ax = fig.add_subplot(111) ax.scatter([0.],[0.],c=1.,alpha=0.2,vmin=0,vmax=2.0,cmap=mpl.cm.jet) fig.canvas.draw() and the following script produces a single point that is red and definitely not translucent, because the color defined by c= is above vmax. import matplotlib.pyplot as mpl fig = mpl.figure() ax = fig.add_subplot(111) ax.scatter([0.],[0.],c=1.,alpha=0.2,vmin=0,vmax=0.5,cmap=mpl.cm.jet) fig.canvas.draw() Whether this is intentional or not, I'm not sure, but I would have expected that alpha overrides the fact the color is out of bounds. In any case, this pops up sometimes if I am plotting multiple points with different colors given by an array, because vmax and vmin are automatically computed, and because of numerical accuracy sometimes the 'brightest' point loses it's alpha. The following example illustrates this: import matplotlib.pyplot as mpl import numpy as np np.random.seed(-12421412) x = np.random.random(10000) y = np.random.random(10000) c = np.random.random(10000) fig = mpl.figure() ax = fig.add_subplot(111) ax.scatter(x,y,c=c,alpha=0.01,cmap=mpl.cm.jet) fig.canvas.draw() Is this a bug in the way the colormap/alpha is handled? Thanks, Thomas -- View this message in context: http://www.nabble.com/bug-in-scatter--tp24811933p24811933.html Sent from the matplotlib - users mailing list archive at Nabble.com.
For this particular data set you might try simply using a log-scaled Y-axis. As to the larger question of interactively adding/removing plot elements, take a look at Enthought's Chaco toolkit. I think most people would agree that its plotting features are not as rich as mpl, but with respect to customizing interaction with graphical elements, it seems like the best path out there. See http://code.enthought.com/projects/chaco/docs/html/user_manual/faq.html Josh Gökhan SEVER-2 wrote: > > Hello, > > I was wondering if it is possible to hide some data on figures using a say > right click option to any of the legend entry and make it temporarily > hidden/visible to better analyse the rest of the data? > > Check this screenshot for example: > > http://img25.imageshack.us/img25/9427/datahiding.png > > The red data clutters the rest of the figure, and I would like to be able > to > hide it temporarily so that I can investigate the other two relations more > easily. > > Any ideas? or alternative solutions? > > Thanks. > > -- > Gökhan > ----- Josh Hemann Statistical Advisor http://www.vni.com/ Visual Numerics jh...@vn... | P 720.407.4214 | F 720.407.4199 -- View this message in context: http://www.nabble.com/Hiding-data-via-legend-tp24802219p24811505.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Michael Droettboom wrote: > What distro are you on? It seems that Tcl/Tk moves the header files > around on a regular basis while not providing a standard way to > determine their location. It's like a wild goose chase ;) Perhaps > you're running something new and blazing new territory here ;) Mandriva 2009.1 (64-bit) Although the header files seem to me to be in pretty standard locations: [jr@blikbrein ~]$ locate tcl.h /usr/include/tcl.h /usr/include/tcl8.6/generic/tcl.h [jr@blikbrein ~]$ ll /usr/include/tcl.h -rw-r--r-- 1 root root 89652 2008年12月24日 02:29 /usr/include/tcl.h [jr@blikbrein ~]$ ll /usr/include/tcl8.6/generic/tcl.h -rw-r--r-- 1 root root 89652 2008年12月24日 02:29 /usr/include/tcl8.6/generic/tcl.h [jr@blikbrein ~]$ diff /usr/include/tcl.h /usr/include/tcl8.6/generic/tcl.h [jr@blikbrein ~]
Can you add the following to the top of your script: import matplotlib matplotlib.rcParams['verbose.level'] = 'debug-annoying' and send the output here? Most likely the font matching is failing on some other property (e.g. Tahoma) and reverting to the default font, which is non-bold. I don't have the Microsoft fonts installed here, so I can't test whether there's something in particular about them that is causing this failure. Cheers, Mike Gewton Jhames wrote: > I'm having problems to simply set 'bold' the font weight of some > annotations. Tryin'this: > fig = plt.figure(frameon=False) > ax = plt.gca() > > font = matplotlib.font_manager.FontProperties(family='Tahoma', > weight='extra bold', size=12) > > annotation_total = ax.annotate('Total:', xy=(0, -320), xycoords='axes > points', horizontalalignment='left', verticalalignment='top', > fontproperties=font) > The Family and Size work perfectly, only weight is ignored. > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
What distro are you on? It seems that Tcl/Tk moves the header files around on a regular basis while not providing a standard way to determine their location. It's like a wild goose chase ;) Perhaps you're running something new and blazing new territory here ;) Mike John Hunter wrote: > On Tue, Aug 4, 2009 at 9:14 AM, Johann Rohwer<jr...@su...> wrote: > > >> Type "help", "copyright", "credits" or "license" for more information. >> >>>>> import Tkinter >>>>> a=Tkinter.tkinter.create() >>>>> >> which creates a tk window on my desktop. >> >> So really in the dark what's going on here.... >> > > Very odd. I suggest opening up setupext.py and finding the function > "check_for_tk". There are a series of test which ultimately set the > "gotit" variable to determine whether you have tk for building. > Insert a lot of debug print statements throughout the logic of that > function and find out where it is failing and let us know. > > My guess is you will fail in the "explanation = add_tk_flags(module)" > part of the code, so you may need to dive into there and repeat the > exercise to figure out what is failing and why. If you can repeat the > steps that the build process is attempting in your python shell, you > may be able to hone into the point of failure > > JDH > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA
On Tue, Aug 4, 2009 at 9:14 AM, Johann Rohwer<jr...@su...> wrote: > Type "help", "copyright", "credits" or "license" for more information. >>>> import Tkinter >>>> a=Tkinter.tkinter.create() > > which creates a tk window on my desktop. > > So really in the dark what's going on here.... Very odd. I suggest opening up setupext.py and finding the function "check_for_tk". There are a series of test which ultimately set the "gotit" variable to determine whether you have tk for building. Insert a lot of debug print statements throughout the logic of that function and find out where it is failing and let us know. My guess is you will fail in the "explanation = add_tk_flags(module)" part of the code, so you may need to dive into there and repeat the exercise to figure out what is failing and why. If you can repeat the steps that the build process is attempting in your python shell, you may be able to hone into the point of failure JDH
On Tuesday 04 August 2009, John Hunter wrote: > On Tue, Aug 4, 2009 at 3:52 AM, Johann Rohwer<jr...@su...> wrote: > > Using the latest SVN matplotlib, the TkAgg backed does not get > > built even though all the libraries are installed (Linux 64-bit). > > The following error message occurs during the build: > > > > Tkinter: no > > * Using default library and include directories for > > * Tcl and Tk because a Tk window failed to open. > > * You may need to define DISPLAY for Tk to work so > > * that setup can determine where your libraries are > > * located. Tkinter present, but header files are not > > * found. You may need to install development > > * packages. > > The message suggests you may not have access to the windowing > system, and the build process needs it to import tk. Are you > building on a remote box, or as root who may not have access to > your user desktop? No, I'm building as a normal user on the local machine. [jr@blikbrein ~]$ echo $DISPLAY :0.0 Furthermore I can create Tk objects: [jr@blikbrein ~]$ python Python 2.6.1 (r261:67515, Apr 12 2009, 04:14:16) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter >>> a=Tkinter.tkinter.create() which creates a tk window on my desktop. So really in the dark what's going on here.... Johann
On Tue, Aug 4, 2009 at 8:16 AM, Pim Schellart<P.S...@st...> wrote: > 1. option to force display of the full number on each tick (with the > option to display the numbers at an angle to prevent overlapping). This is controlled by the "set_scientific" method of the ScalarFormatter http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.ScalarFormatter For example:: In [101]: ax = gca() In [102]: ax.plot(np.arange(10)*2e20) Out[102]: [<matplotlib.lines.Line2D object at 0x99532ac>] In [103]: draw() In [104]: formatter = ax.yaxis.get_major_formatter() In [105]: formatter.set_scientific(False) In [106]: draw() > 2. option to specify the number to be subtracted manually (to make it > a round number). I don't think there is support for this, but it would be a nice feature:: http://matplotlib.sourceforge.net/faq/howto_faq.html#contributing-howto > 3. option to specify the precision or scientific notation of both the > ticks and the number to be added. You can control at what level the fallover to scientific notation occurs with the set_power_limits method of the formatter:: http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.ScalarFormatter.set_powerlimits This is also exposed as an rc param:: axes.formatter.limits : -7, 7 # use scientific notation if log10 # of the axis range is smaller than the # first or larger than the second See http://matplotlib.sourceforge.net/users/customizing.html Hope this helps! JDH
On Tue, Aug 4, 2009 at 3:52 AM, Johann Rohwer<jr...@su...> wrote: > Using the latest SVN matplotlib, the TkAgg backed does not get built > even though all the libraries are installed (Linux 64-bit). The > following error message occurs during the build: > > Tkinter: no > * Using default library and include directories for > * Tcl and Tk because a Tk window failed to open. > * You may need to define DISPLAY for Tk to work so > * that setup can determine where your libraries are > * located. Tkinter present, but header files are not > * found. You may need to install development > * packages. The message suggests you may not have access to the windowing system, and the build process needs it to import tk. Are you building on a remote box, or as root who may not have access to your user desktop? If so, you can solve these problems by ssh with -X or otherwise make sure that you can launch an X window in your build environment. JDH
On Tue, Aug 4, 2009 at 3:52 AM, Johann Rohwer<jr...@su...> wrote: > Using the latest SVN matplotlib, the TkAgg backed does not get built > even though all the libraries are installed (Linux 64-bit). The > following error message occurs during the build: > > Tkinter: no > * Using default library and include directories for > * Tcl and Tk because a Tk window failed to open. > * You may need to define DISPLAY for Tk to work so > * that setup can determine where your libraries are > * located. Tkinter present, but header files are not > * found. You may need to install development > * packages. The message suggests you may not have access to the windowing system, and the build process needs it to import tk. Are you building on a remote box, or as root who may not have access to your user desktop? If so, you can solve these problems by ssh with -X or otherwise make sure that you can launch an X window in your build environment. JDH
Hi Everyone, I have been using matplotlib for quite some time now. However I have a few questions regarding the handling of text in title and axis labels. When creating an image using subplot the title and axis label text tends to overlap. Is there an option to prevent this. Of course one can do this manually but this requires inspection of the image and adjustment. It would be very helpful if this is done automatically (even better when it would be the default option). Furthermore the x-, y-axis ticks are automatically displayed with some part stripped which is displayed separately as a number to be added. I would really like to have the following options. 1. option to force display of the full number on each tick (with the option to display the numbers at an angle to prevent overlapping). 2. option to specify the number to be subtracted manually (to make it a round number). 3. option to specify the precision or scientific notation of both the ticks and the number to be added. Is this currently possible? And if not would you be willing to add these options? In my humble opinion the first option should at least be part of the pyplot commands as it is needed often by me and my colleagues. Kind regards, Pim Schellart
On Tue, Aug 4, 2009 at 4:22 AM, Maxim Khazimullin<ma...@an...> wrote: > Is it normal for eps files (when files with different dpi have the same > sizes), or something wrong with matplotlib? PS is a vector drawing backend, so the concept of "dots per inch" does not apply, unless you are explictly including a raster image int he output. So it is a feature, not a bug :-). More detail on raster vs vector backends here: http://matplotlib.sourceforge.net/faq/installing_faq.html#backends JDH
On 2009年7月30日 09:41:43 -1000 Eric Firing <ef...@ha...> wrote: > Jae-Joon Lee wrote: > > I don't think there is any user-visible support for registering a > > custom colormap. > > Now there is: svn r7309. Its use is illustrated via a modification of > examples/pylab_examples/custom_cmap.py. Awesome, works just as I need it! Keep up the good work! Now I'm one step closer to abandoning matlab :-D Philipp > > With just a little more work, we could make it so that anything taking a > "cmap" kwarg will accept either a Colormap instance or the name of a > registered instance (including builtins). Maybe I will do that later today. > > Eric > > > > However, it seems to me that adding the colormap to > > matplotlib.cm.datad distionary is enough. > > Note that the value need to be a dictionary of RGB specification, not > > the actual colormap instance. > > > > for example, > > > > mycolormap = {'blue': ((0.0, 0.40000000000000002, 0.40000000000000002), > > (1.0, 0.40000000000000002, 0.40000000000000002)), > > 'green': ((0.0, 0.5, 0.5), (1.0, 1.0, 1.0)), > > 'red': ((0.0, 0.0, 0.0), (1.0, 1.0, 1.0))} > > > > matplotlib.cm.datad["mycolormap"] = mycolormap > > rcParams["image.cmap"]="mycolormap" > > > > Having a function (like jet in pylab) would not be also difficult. > > Take a look at the definition of "jet" function (for example) in the > > pylab.py. > > > > We may be better to have a proper way to register a custom colormap. > > I'll try to take a more look later, but any patch will be appreciated. > > > > Regards, > > > > -JJ > > > > > > > > On Thu, Jul 30, 2009 at 3:48 AM, Philipp > > Lies<phi...@go...> wrote: > >> Does no one have an idea? If not, this is a severe usability bug! > >> > >> Philipp Lies wrote: > >>> Hi, > >>> > >>> I just created a hsv-like color map with gray levels only, now I'd like to > >>> use this as default color map. But how? Calling it like hsv() does not > >>> work and I did not find a hint in the documentation how to set a user > >>> defined color map interactively as default color map. > >>> > >>> Cheers > >>> > >>> Philipp > >>> > >> -- > >> View this message in context: http://www.nabble.com/setting-user-defined-color-map-as-default-tp24587528p24733739.html > >> Sent from the matplotlib - users mailing list archive at Nabble.com. > >> > >> > >> ------------------------------------------------------------------------------ > >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > >> trial. Simplify your report design, integration and deployment - and focus on > >> what you do best, core application coding. Discover what's new with > >> Crystal Reports now. http://p.sf.net/sfu/bobj-july > >> _______________________________________________ > >> Matplotlib-users mailing list > >> Mat...@li... > >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > > trial. Simplify your report design, integration and deployment - and focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Philipp Lies Max Planck Institute for Biological Cybernetics Computational Vision & Neuroscience Group Spemannstr. 41 D-72076 Tuebingen Germany Phone: +49-7071-601-1788 Fax: +49-7071-601-552 E-Mail: phi...@tu... http://www.kyb.mpg.de/bethgegroup
Hi, I have a very simple script:: x = linspace(0,1) plot(x, sin(pi*x)) savefig("test-300.eps", dpi = 300) savefig("test-600.eps", dpi = 600) output of ll *.eps: -rw------- 1 maxim maxim 10759 2009年08月03日 20:27 test-300.eps -rw------- 1 maxim maxim 10759 2009年08月03日 20:27 test-600.eps Is it normal for eps files (when files with different dpi have the same sizes), or something wrong with matplotlib? Best regards, Maxim