SourceForge logo
SourceForge logo
Menu

matplotlib-users — Discussion related to using matplotlib

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
(17)
2
(3)
3
(2)
4
(11)
5
(8)
6
(22)
7
(16)
8
(9)
9
(14)
10
(1)
11
(8)
12
(5)
13
(7)
14
(10)
15
(28)
16
(8)
17
(20)
18
(6)
19
(5)
20
(15)
21
(8)
22
(7)
23
(14)
24
(10)
25
(6)
26
(8)
27
(9)
28
(11)
29
(13)
30
(20)

Showing 15 results of 15

From: Sarlo, J. S <JS...@Ce...> - 2011年09月20日 23:27:44
I am having problems compiling matplotlib on RHEL5. I changed the setup.cfg to use a different base directory, but other than that no files changed/customized.
Thanks.
Jeff
$ python setup.py build
basedirlist is: ['/share/apps/gpaw-0.8.0-py2.6'] ============================================================================
BUILDING MATPLOTLIB
 matplotlib: 1.0.1
 python: 2.6.7 (r267:88850, Sep 20 2011, 13:39:45) [GCC
 4.1.2 20080704 (Red Hat 4.1.2-51)]
 platform: linux2
REQUIRED DEPENDENCIES
 numpy: 1.5.1
 freetype2: 13.0.7
OPTIONAL BACKEND DEPENDENCIES
 libpng: 1.5.4
 Tkinter: Tkinter: 73770, Tk: 8.4, Tcl: 8.4
 wxPython: no
 * wxPython not found
 Gtk+: no
 * Building for Gtk+ requires pygtk; you must be able
 * to "import gtk" in your build/install environment
 Mac OS X native: no
 Qt: no
 Qt4: no
 Cairo: 1.8.10
OPTIONAL DATE/TIMEZONE DEPENDENCIES
 datetime: present, version unknown
 dateutil: matplotlib will provide
 pytz: matplotlib will provide adding pytz
OPTIONAL USETEX DEPENDENCIES
 dvipng: 1.5
 ghostscript: 8.70
 latex: 3.141592
 pdftops: 3.00
[Edit setup.cfg to suppress the above messages] ============================================================================
pymods ['pylab']
packages ['matplotlib', 'matplotlib.backends', 'matplotlib.backends.qt4_editor', 'matplotlib.projections', 'matplotlib.testing', 'matplotlib.testing.jpl_units', 'matplotlib.tests', 'mpl_toolkits', 'mpl_toolkits.mplot3d', 'mpl_toolkits.axes_grid', 'mpl_toolkits.axes_grid1', 'mpl_toolkits.axisartist', 'matplotlib.sphinxext', 'matplotlib.numerix', 'matplotlib.numerix.mlab', 'matplotlib.numerix.ma', 'matplotlib.numerix.linear_algebra', 'matplotlib.numerix.random_array', 'matplotlib.numerix.fft', 'matplotlib.tri', 'matplotlib.delaunay', 'pytz', 'dateutil', 'dateutil/zoneinfo'] running build running build_py copying lib/matplotlib/mpl-data/matplotlibrc -> build/lib.linux-x86_64-2.6/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -> build/lib.linux-x86_64-2.6/matplotlib/mpl-data
running build_ext
building 'matplotlib._png' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/share/apps/gpaw-0.8.0-py2.6/include -I/share/apps/gpaw-0.8.0-py2.6/include/glib-2.0 -I/share/apps/gpaw-0.8.0-py2.6/include/glib-2.0/include -fPIC -DPY_ARRAY_UNIQUE_SYMBOL=MPL_ARRAY_API -DPYCXX_ISO_CPP_LIB=1 -I/share/apps/gpaw-0.8.0-py2.6/include/libpng15 -I/share/apps/gpaw-0.8.0-py2.6/include -I. -I/share/apps/gpaw-0.8.0-py2.6/lib/python2.6/site-packages/numpy/core/include -I. -I/share/apps/gpaw-0.8.0-py2.6/include/python2.6 -c src/_png.cpp -o build/temp.linux-x86_64-2.6/src/_png.o
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
src/_png.cpp: In member function 'Py::Object _png_module::read_png(const Py::Tuple&)':
src/_png.cpp:353: error: invalid use of undefined type 'struct png_info_def'
/share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
src/_png.cpp:354: error: invalid use of undefined type 'struct png_info_def'
/share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
src/_png.cpp:356: error: invalid use of undefined type 'struct png_info_def'
/share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
src/_png.cpp:364: error: invalid use of undefined type 'struct png_info_def'
/share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
src/_png.cpp:377: error: invalid use of undefined type 'struct png_info_def'
/share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
src/_png.cpp:383: error: invalid use of undefined type 'struct png_info_def'
/share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
src/_png.cpp:411: error: invalid use of undefined type 'struct png_info_def'
/share/apps/gpaw-0.8.0-py2.6/include/png.h:692: error: forward declaration of 'struct png_info_def'
From: Benjamin R. <ben...@ou...> - 2011年09月20日 20:36:55
On Sat, Sep 17, 2011 at 8:00 PM, <ob...@hu...> wrote:
> Hello.
>
> I have some data with corresponding date value (Y-M-D) and having
> hard time to understand how MPL works with dates.
> I see it uses Python datetime, but I just can't figure how to make
> plots when some date data is missing.
>
> Considering above, is there some easy way to make, lets say, 2
> variables plot where each variable could have 1-2 missing values?
> Does date (abscissa) values have to follow some rules so that MPL
> could recognize it as date?
>
> Cheers
>
>
Maybe this example will help?
http://matplotlib.sourceforge.net/faq/howto_faq.html#skip-dates-where-there-is-no-data
Cheers!
Ben Root
From: Isidora <is...@ju...> - 2011年09月20日 17:32:45
I am plotting an open fill path over a U.S. map for which I'd like to extend the filling all the way to the closest border of U.S.
I thought I could use fill_between() my path and the path in the borders path list returned by drawcountries() that is closest to mine. So, I've been looking for examples on how to use fill_between() when 2 paths are known with no much luck for several days.
Does anyone know a better approach to solve this issue? 
Does anyone know where I could find an example for fill_between() with 2 given paths as opposed to between 2 curves plotted in the same plot? 
Thanks
From: Brad M. <bra...@gm...> - 2011年09月20日 17:29:16
Hi Ben,
Thanks. Using label_outer() does, as you say, only show labels on the edge
and that is something I wanted to do. It doesn't, however, make a common
y-axis label and a common x-axis label (instead there are now 2 of each,
instead of 4). It appears that I might be able to add a common y and x label
by brute-forcing the labels with text, along the lines of something like:
fig.text(0.5,0.04,'common xlabel',ha='center',va='center')
fig.text(0.00,0.5,'common
> ylabel',ha='center',va='center',rotation='vertical')
Now I just need to play with spacing and change precise ticklabels and I'll
be able to finish this plot up!
Thanks everyone,
Brad
On Tue, Sep 20, 2011 at 9:12 AM, Benjamin Root <ben...@ou...> wrote:
>
>
> On Tue, Sep 20, 2011 at 11:06 AM, Brad Malone <bra...@gm...>wrote:
>
>> Hi Jeffrey,
>>
>> Thanks the response. Sorry about the term "global axis". That was clearly
>> not the best way to say it. What I meant to say is global x axis LABEL and
>> y-axis LABEL. This can be seen in this example (
>> http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label?action=AttachFile&do=get&target=Same_ylabel_subplots.png
>> )
>>
>> although when I tried to do something similar with a 2x2 grid of plots it
>> didn't seem to be working for me. Their example works due to these lines
>> here
>>
>> import pylab
>>> 2
>>> 3 figprops = dict(figsize=(8., 8. / 1.618), dpi=128)
>>> # Figure properties
>>> 4 adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
>>> wspace=0.2 hspace=0.2) # Subplot properties
>>> 5
>>> 6 fig = pylab.figure(**figprops)
>>> # New figure
>>> 7 fig.subplots_adjust(**adjustprops)
>>> # Tunes the subplot layout
>>> 8
>>> 9 ax = fig.add_subplot(3, 1, 1)
>>> 10 bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax)
>>> 11 cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax)
>>> 12
>>> 13 ax.plot([0,1,2], [2,3,4], 'k-')
>>> 14 bx.plot([0,1,2], [2,3,4], 'k-')
>>> 15 cx.plot([0,1,2], [2,3,4], 'k-')
>>> 16
>>> 17 pylab.setp(ax.get_xticklabels(), visible=False)
>>> 18 pylab.setp(bx.get_xticklabels(), visible=False)
>>> 19
>>> 20 bx.set_ylabel('This is a long label shared among more axes',
>>> fontsize=14)
>>> 21 cx.set_xlabel('And a shared x label', fontsize=14)
>>
>>
>>
>> specifically probably the bx/cx_set label commands coupled with the sharex
>> commands in the subplot label. But when I tried to add these things for my
>> 2x2 plot it always looked like the label was attached to one of the plots or
>> another instead of spanning the whole range.
>>
>> Thanks,
>> Brad
>>
>>
> Maybe the label_outer() function will be what you need. Call it for each
> subplot axes, and set the labels as you would normally. matplotlib would
> then set visible only the labels that are on the outside edge.
>
> Another option is to use the AxesGrid1 toolkit, which makes these things
> easy. Also note that the soon-to-be released v1.1 will have a
> tight_layout() function that can help with your spacing issues.
>
> Cheers!
> Ben Root
>
>
From: Benjamin R. <ben...@ou...> - 2011年09月20日 16:13:19
On Tue, Sep 20, 2011 at 11:06 AM, Brad Malone <bra...@gm...> wrote:
> Hi Jeffrey,
>
> Thanks the response. Sorry about the term "global axis". That was clearly
> not the best way to say it. What I meant to say is global x axis LABEL and
> y-axis LABEL. This can be seen in this example (
> http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label?action=AttachFile&do=get&target=Same_ylabel_subplots.png
> )
>
> although when I tried to do something similar with a 2x2 grid of plots it
> didn't seem to be working for me. Their example works due to these lines
> here
>
> import pylab
>> 2
>> 3 figprops = dict(figsize=(8., 8. / 1.618), dpi=128)
>> # Figure properties
>> 4 adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
>> wspace=0.2 hspace=0.2) # Subplot properties
>> 5
>> 6 fig = pylab.figure(**figprops)
>> # New figure
>> 7 fig.subplots_adjust(**adjustprops)
>> # Tunes the subplot layout
>> 8
>> 9 ax = fig.add_subplot(3, 1, 1)
>> 10 bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax)
>> 11 cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax)
>> 12
>> 13 ax.plot([0,1,2], [2,3,4], 'k-')
>> 14 bx.plot([0,1,2], [2,3,4], 'k-')
>> 15 cx.plot([0,1,2], [2,3,4], 'k-')
>> 16
>> 17 pylab.setp(ax.get_xticklabels(), visible=False)
>> 18 pylab.setp(bx.get_xticklabels(), visible=False)
>> 19
>> 20 bx.set_ylabel('This is a long label shared among more axes',
>> fontsize=14)
>> 21 cx.set_xlabel('And a shared x label', fontsize=14)
>
>
>
> specifically probably the bx/cx_set label commands coupled with the sharex
> commands in the subplot label. But when I tried to add these things for my
> 2x2 plot it always looked like the label was attached to one of the plots or
> another instead of spanning the whole range.
>
> Thanks,
> Brad
>
>
Maybe the label_outer() function will be what you need. Call it for each
subplot axes, and set the labels as you would normally. matplotlib would
then set visible only the labels that are on the outside edge.
Another option is to use the AxesGrid1 toolkit, which makes these things
easy. Also note that the soon-to-be released v1.1 will have a
tight_layout() function that can help with your spacing issues.
Cheers!
Ben Root
From: Brad M. <bra...@gm...> - 2011年09月20日 16:07:00
Hi Jeffrey,
Thanks the response. Sorry about the term "global axis". That was clearly
not the best way to say it. What I meant to say is global x axis LABEL and
y-axis LABEL. This can be seen in this example (
http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label?action=AttachFile&do=get&target=Same_ylabel_subplots.png
)
although when I tried to do something similar with a 2x2 grid of plots it
didn't seem to be working for me. Their example works due to these lines
here
 import pylab
> 2
> 3 figprops = dict(figsize=(8., 8. / 1.618), dpi=128)
> # Figure properties
> 4 adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
> wspace=0.2 hspace=0.2) # Subplot properties
> 5
> 6 fig = pylab.figure(**figprops)
> # New figure
> 7 fig.subplots_adjust(**adjustprops)
> # Tunes the subplot layout
> 8
> 9 ax = fig.add_subplot(3, 1, 1)
> 10 bx = fig.add_subplot(3, 1, 2, sharex=ax, sharey=ax)
> 11 cx = fig.add_subplot(3, 1, 3, sharex=ax, sharey=ax)
> 12
> 13 ax.plot([0,1,2], [2,3,4], 'k-')
> 14 bx.plot([0,1,2], [2,3,4], 'k-')
> 15 cx.plot([0,1,2], [2,3,4], 'k-')
> 16
> 17 pylab.setp(ax.get_xticklabels(), visible=False)
> 18 pylab.setp(bx.get_xticklabels(), visible=False)
> 19
> 20 bx.set_ylabel('This is a long label shared among more axes',
> fontsize=14)
> 21 cx.set_xlabel('And a shared x label', fontsize=14)
specifically probably the bx/cx_set label commands coupled with the sharex
commands in the subplot label. But when I tried to add these things for my
2x2 plot it always looked like the label was attached to one of the plots or
another instead of spanning the whole range.
Thanks,
Brad
On Tue, Sep 20, 2011 at 1:28 AM, Jeffrey Spencer <jef...@gm...>wrote:
> Not sure what you mean global axis but I think I was trying to do
> something similar with this. This is the chunk of one subplot. Specifically
> look at last three lines:
> ax = fig.add_subplot(2,2,2)
> ax.set_title('b) 5')
> ax.set_ylim((0,yUpper))
> for i in tempRun:
> ax.plot(x,actSum[1,semi,i,semi], label=tempLabel[i],
> linestyle=dashs[i%len(dashs)], color=plotColor[i%len(plotColor)])
> clear_spines(ax)
> ax.set_xticklabels('')
> ax.yaxis.set_ticks_position('left')
> ax.xaxis.set_ticks_position('bottom')
>
> Cheers,
> Jeff
>
>
> On 20/09/11 09:20, Brad Malone wrote:
>
> Hello again,
>
> I've actually made some more progress on my last question after finding
> this site:
> http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label
>
> and I was able to adjust the widths of my spacing.
>
> My current plot looks like this:
> http://imageshack.us/photo/my-images/849/current.png/
>
> with source code that looks like:
>
>> adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
>> wspace=0.25, hspace=0.25)
>> fig=figure()
>> fig.subplots_adjust(**adjustprops)
>>
>> ax=subplot(221)
>> plot(x2cp,y2cp,'bo',markersize=3)
>> #ax.set_title('2cP')
>> text(12,0.03,'2cP')
>> #ylabel('Displacement')
>> axis([0,16,0,0.04])
>> bx=subplot(223)
>> plot(x2cb,y2cb,'bo',markersize=3)
>> #ax.set_title('2cB')
>> text(12,0.225,'2cB')
>> axis([0,16,0,0.3])
>> cx=subplot(222)
>> plot(x6fp,y6fp,'bo',markersize=3)
>> #ax.set_title('6fP')
>> text(12,0.03375,'6fP')
>> axis([0,16,0,0.045])
>> dx=subplot(224)
>> plot(x6fb,y6fb,'bo',markersize=3)
>> #ax.set_title('6fB')
>> text(12,0.225,'6fB')
>> axis([0,16,0,0.3])
>>
>>
>> show()
>
>
>
> Now the only thing I'd like to do now is create a global y-axis and a
> global x-axis along the bottom for all 4 plots (which the website I linked
> to above gives some hints about, but trying what I thought was equivalent
> didn't work). And lastly, I wanted those y-axes which go from 0.000 to 0.040
> to instead go from 0.00 to 0.04 (i.e., only two decimal places, getting rid
> of the ones that are in between).
>
> Thanks for any guidance you can give.
>
> Best,
> Brad
>
> On Mon, Sep 19, 2011 at 3:32 PM, Brad Malone <bra...@gm...>wrote:
>
>> Hi, I am trying to do a simple 2x2 box of plots. My code is so far very
>> simple, and simply looks something like this.
>>
>> ax=subplot(221)
>>>
>>> plot(x2cp,y2cp)
>>> ax.set_title('2cP')
>>> ylabel('Displacement')
>>> ax=subplot(222)
>>> plot(x2cb,y2cb)
>>> ax.set_title('2cB')
>>> ax=subplot(223)
>>> plot(x6fp,y6fp)
>>> ax.set_title('6fP')
>>> ax=subplot(224)
>>> plot(x6fb,y6fb)
>>> ax.set_title('6fB')
>>> show()
>>>
>>>
>> But when I do this, the text and numbers from various plots overlap each
>> other and get in the way (I noticed this is a common problem among the
>> images in the matplotlib gallery as well). I have 2 questions:
>>
>> 1). How can I control the spacing, or padding, between the plots so that
>> the numbers don't overlap?
>> 2). Is there a way for me to have a single common y-axis label and x-axis
>> label that runs along the full left-hand side and bottom, respectively?
>>
>> Thanks so much for the help!
>>
>> Brad
>>
>
>
>
> ------------------------------------------------------------------------------
> 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. Business sense. IT sense. Common sense.http://p.sf.net/sfu/splunk-d2dcopy1
>
>
>
> _______________________________________________
> Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: Klonuo U. <kl...@gm...> - 2011年09月20日 13:28:01
Thank you very much Fabrice
I have no further questions
Cheers
On Tue, Sep 20, 2011 at 1:43 PM, Fabrice Silva <si...@lm...>wrote:
> Le mardi 20 septembre 2011 à 12:59 +0200, Klonuo Umom a écrit :
>
> > If you don't mind, I have another question.
> > Those files are audio files. Can I limit dB range so that, let's say,
> > noise below 120dB isn't drawn? Is there some parameter so I can set
> > this range?
>
> specgram internally computed the spectrogram and then displays it into a
> AxesImage instance (the im output argument). You can limit the range of
> values the colormap extends by passing extra arguments to specgram that
> are internally passed to the AxesImage.imshow method:
>
> See Argument "kwargs" in
>
> http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.specgram
> and
>
> http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.imshow
>
> >>> Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win,
> noverlap=2, vmin=-120)
>
> --
> Fabrice Silva
>
>
>
> ------------------------------------------------------------------------------
> 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. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Daniel H. <dh...@gm...> - 2011年09月20日 12:39:13
I'm partial to wxFormBuilder myself, and the latest builds even have
AUI support. There is no direct integration with matplotlib, though.
To place a plot, all I do is create a wx.Panel in wxFormBuilder, and
use that as a container for the plot (you would have a PlotPanel,
which you derive from wx.Panel). You could also subclass that
container same panel if you wanted to (within wxFormBuilder), but I
don't see the need.
On Tue, Sep 20, 2011 at 7:23 AM, Martijn <mar...@gm...> wrote:
> Hi,
> I am about to start wring a small application that includes a graphical
> user interface written using wxPython and several matplotlib graphs.
> Since I want to separate application logic and GUI code as much as
> possible, I would like to use either XRC or Pythoncard.
> Pythoncard seems to be the most straightforward and has recently
> included a matplotlib widget. However, the website says that it requires
> some modifications to Matplotlib. I would like to have some feedback
> from people who have embedded Matplotlib into Pythoncard.
> Alternatively, I could use XRC. This seems to be more mature/actively
> developed but involves more GUI code (manually binding callbacks). What
> are your experiences with embedding graphs in GUIs created using wxGlade
> for wxFormBuilder?
>
> with kind regards,
>
> Martijn
>
>
> ------------------------------------------------------------------------------
> 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. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
-- 
Daniel Hyams
dh...@gm...
From: Martijn <mar...@gm...> - 2011年09月20日 12:33:15
Hi,
I am about to start wring a small application that includes a graphical
user interface written using wxPython and several matplotlib graphs.
Since I want to separate application logic and GUI code as much as
possible, I would like to use either XRC or Pythoncard.
Pythoncard seems to be the most straightforward and has recently
included a matplotlib widget. However, the website says that it requires
some modifications to Matplotlib. I would like to have some feedback
from people who have embedded Matplotlib into Pythoncard.
Alternatively, I could use XRC. This seems to be more mature/actively
developed but involves more GUI code (manually binding callbacks). What
are your experiences with embedding graphs in GUIs created using wxGlade
for wxFormBuilder?
with kind regards,
Martijn
From: Fabrice S. <si...@lm...> - 2011年09月20日 11:42:00
Le mardi 20 septembre 2011 à 12:59 +0200, Klonuo Umom a écrit :
> If you don't mind, I have another question.
> Those files are audio files. Can I limit dB range so that, let's say,
> noise below 120dB isn't drawn? Is there some parameter so I can set
> this range?
specgram internally computed the spectrogram and then displays it into a
AxesImage instance (the im output argument). You can limit the range of
values the colormap extends by passing extra arguments to specgram that
are internally passed to the AxesImage.imshow method:
See Argument "kwargs" in 
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.specgram
and 
http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.imshow 
>>> Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win,
noverlap=2, vmin=-120)
-- 
Fabrice Silva
From: Klonuo U. <kl...@gm...> - 2011年09月20日 10:59:55
Yes, it could be handy. I only needed it temporarily on couple of data
files.
If you don't mind, I have another question.
Those files are audio files. Can I limit dB range so that, let's say, noise
below 120dB isn't drawn? Is there some parameter so I can set this range?
Thanks
On Tue, Sep 20, 2011 at 12:27 PM, Fabrice Silva <si...@lm...>wrote:
> Le mardi 20 septembre 2011 à 12:12 +0200, Klonuo Umom a écrit :
> > Ah, I was using wrong parameter... Thanks. That works fine
>
> You could also use a callable (instead of the vector) so that specgram
> internally automatically get a NFFT length window
>
> wrapper = lambda n: kaiser(n,8)
> Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=wrapper,
> noverlap=2)
>
> a wrapper is needed as specgram expects a function with a single argument
> (as documented).
> --
> Fabrice Silva
>
>
>
> ------------------------------------------------------------------------------
> 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. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Fabrice S. <si...@lm...> - 2011年09月20日 10:25:46
Le mardi 20 septembre 2011 à 12:12 +0200, Klonuo Umom a écrit :
> Ah, I was using wrong parameter... Thanks. That works fine
You could also use a callable (instead of the vector) so that specgram
internally automatically get a NFFT length window
wrapper = lambda n: kaiser(n,8)
Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=wrapper, noverlap=2)
a wrapper is needed as specgram expects a function with a single argument (as documented).
-- 
Fabrice Silva
From: Klonuo U. <kl...@gm...> - 2011年09月20日 10:12:59
Ah, I was using wrong parameter... Thanks. That works fine
On Tue, Sep 20, 2011 at 8:27 AM, Fabrice Silva <si...@lm...>wrote:
> Le lundi 19 septembre 2011 à 19:54 +0200, Klonuo Umom a écrit :
> > I want to use kaiser window that's part of numpy for drawing spectrogram
> >
> > specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
> > window=mlab.window_hanning, noverlap=128,
> > cmap=None, xextent=None, pad_to=None, sides='default',
> > scale_by_freq=None, **kwargs)
> >
> > *window*: callable or ndarray
> > A function or a vector of length *NFFT*. To create window
> > vectors see :func:`window_hanning`, :func:`window_none`,
> > :func:`numpy.blackman`, :func:`numpy.hamming`,
> > :func:`numpy.bartlett`, :func:`scipy.signal`,
> > :func:`scipy.signal.get_window`, etc. The default is
> > :func:`window_hanning`. If a function is passed as the
> > argument, it must take a data segment as an argument and
> > return the windowed version of the segment.
> >
> > So I tried:
> >
> > Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser,
> > noverlap=2)
> > TypeError: kaiser() takes exactly 2 arguments (1 given)
>
> Does the following solve your problem ?
> NFFT = 1024
> win = kaiser(NFFT,8) # 8 is the shpe parameter of the window
> Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win,
> noverlap=2)
>
>
>
> ------------------------------------------------------------------------------
> 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. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: Jeffrey S. <jef...@gm...> - 2011年09月20日 08:24:42
Not sure what you mean global axis but I think I was trying to do 
something similar with this. This is the chunk of one subplot. 
Specifically look at last three lines:
ax = fig.add_subplot(2,2,2)
ax.set_title('b) 5')
ax.set_ylim((0,yUpper))
for i in tempRun:
 ax.plot(x,actSum[1,semi,i,semi], label=tempLabel[i], 
linestyle=dashs[i%len(dashs)], color=plotColor[i%len(plotColor)])
clear_spines(ax)
ax.set_xticklabels('')
ax.yaxis.set_ticks_position('left')
ax.xaxis.set_ticks_position('bottom')
Cheers,
Jeff
On 20/09/11 09:20, Brad Malone wrote:
> Hello again,
>
> I've actually made some more progress on my last question after 
> finding this site: 
> http://www.scipy.org/Cookbook/Matplotlib/Multiple_Subplots_with_One_Axis_Label
>
> and I was able to adjust the widths of my spacing.
>
> My current plot looks like this:
> http://imageshack.us/photo/my-images/849/current.png/
>
> with source code that looks like:
>
> adjustprops = dict(left=0.1, bottom=0.1, right=0.97, top=0.93,
> wspace=0.25, hspace=0.25)
> fig=figure()
> fig.subplots_adjust(**adjustprops)
>
> ax=subplot(221)
> plot(x2cp,y2cp,'bo',markersize=3)
> #ax.set_title('2cP')
> text(12,0.03,'2cP')
> #ylabel('Displacement')
> axis([0,16,0,0.04])
> bx=subplot(223)
> plot(x2cb,y2cb,'bo',markersize=3)
> #ax.set_title('2cB')
> text(12,0.225,'2cB')
> axis([0,16,0,0.3])
> cx=subplot(222)
> plot(x6fp,y6fp,'bo',markersize=3)
> #ax.set_title('6fP')
> text(12,0.03375,'6fP')
> axis([0,16,0,0.045])
> dx=subplot(224)
> plot(x6fb,y6fb,'bo',markersize=3)
> #ax.set_title('6fB')
> text(12,0.225,'6fB')
> axis([0,16,0,0.3])
>
>
> show()
>
>
>
> Now the only thing I'd like to do now is create a global y-axis and a 
> global x-axis along the bottom for all 4 plots (which the website I 
> linked to above gives some hints about, but trying what I thought was 
> equivalent didn't work). And lastly, I wanted those y-axes which go 
> from 0.000 to 0.040 to instead go from 0.00 to 0.04 (i.e., only two 
> decimal places, getting rid of the ones that are in between).
>
> Thanks for any guidance you can give.
>
> Best,
> Brad
>
> On Mon, Sep 19, 2011 at 3:32 PM, Brad Malone <bra...@gm... 
> <mailto:bra...@gm...>> wrote:
>
> Hi, I am trying to do a simple 2x2 box of plots. My code is so far
> very simple, and simply looks something like this.
>
> ax=subplot(221)
>
> plot(x2cp,y2cp)
> ax.set_title('2cP')
> ylabel('Displacement')
> ax=subplot(222)
> plot(x2cb,y2cb)
> ax.set_title('2cB')
> ax=subplot(223)
> plot(x6fp,y6fp)
> ax.set_title('6fP')
> ax=subplot(224)
> plot(x6fb,y6fb)
> ax.set_title('6fB')
> show()
>
>
> But when I do this, the text and numbers from various plots
> overlap each other and get in the way (I noticed this is a common
> problem among the images in the matplotlib gallery as well). I
> have 2 questions:
>
> 1). How can I control the spacing, or padding, between the plots
> so that the numbers don't overlap?
> 2). Is there a way for me to have a single common y-axis label and
> x-axis label that runs along the full left-hand side and bottom,
> respectively?
>
> Thanks so much for the help!
>
> Brad
>
>
>
>
> ------------------------------------------------------------------------------
> 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. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2dcopy1
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Fabrice S. <si...@lm...> - 2011年09月20日 06:46:58
Le lundi 19 septembre 2011 à 19:54 +0200, Klonuo Umom a écrit :
> I want to use kaiser window that's part of numpy for drawing spectrogram
> 
> specgram(x, NFFT=256, Fs=2, Fc=0, detrend=mlab.detrend_none,
> window=mlab.window_hanning, noverlap=128,
> cmap=None, xextent=None, pad_to=None, sides='default',
> scale_by_freq=None, **kwargs)
> 
> *window*: callable or ndarray
> A function or a vector of length *NFFT*. To create window
> vectors see :func:`window_hanning`, :func:`window_none`,
> :func:`numpy.blackman`, :func:`numpy.hamming`,
> :func:`numpy.bartlett`, :func:`scipy.signal`,
> :func:`scipy.signal.get_window`, etc. The default is
> :func:`window_hanning`. If a function is passed as the
> argument, it must take a data segment as an argument and
> return the windowed version of the segment.
> 
> So I tried:
> 
> Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=kaiser,
> noverlap=2)
> TypeError: kaiser() takes exactly 2 arguments (1 given)
Does the following solve your problem ?
NFFT = 1024
win = kaiser(NFFT,8) # 8 is the shpe parameter of the window
Pxx, freqs, bins, im = specgram(x, NFFT=1024, Fs=fs, window=win, noverlap=2)

Showing 15 results of 15

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /