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
(16) |
2
(16) |
3
(5) |
4
(4) |
5
(4) |
6
(10) |
7
(33) |
8
(11) |
9
(20) |
10
(7) |
11
(8) |
12
(18) |
13
(27) |
14
(21) |
15
(15) |
16
(10) |
17
(12) |
18
(3) |
19
(12) |
20
(12) |
21
(14) |
22
(32) |
23
(15) |
24
(20) |
25
(12) |
26
(32) |
27
(29) |
28
(17) |
29
(25) |
30
(12) |
31
(5) |
Hi Everyone, I am working on a weather conditions plot containing wind speed and direction. For that I use a custom polar projection. Now updated from Matplotlib 0.99 to 1.0 to use the subplot2grid feature. Now, after trying and searching for hours, I seem to be too dumb to combine my custom projection and subplot2grid. Before it did this way: ax1=plt.figure().add_subplot(111, projection='northpolar') But now I need sth like: ax2 = plt.subplot2grid((5,5), (2,3), colspan=2, rowspan=3) subplot2grid doesn't like a projection keyword. How can I implement my projection? Thanks! BB -- View this message in context: http://old.nabble.com/matplotlib-subplot2grid-and-projection-tp29268717p29268717.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Replace this line: ax.plot(f/1000, Sserie) With this line: ax.plot(f/1000.0, Sserie) And tell us how things go. Python 2.6 distinguishes between integers and floats very strictly. Hence: In [1]: 20/1000 Out[1]: 0 In [2]: 20.0/1000.0 Out[2]: 0.02 See the difference? -paul From: Waléria Antunes David [mailto:wal...@gm...] Sent: Monday, July 26, 2010 10:01 AM To: Angus McMorland Cc: mat...@li... Subject: Re: [Matplotlib-users] Hz to KHz i don't understand.. On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...<mailto:am...@gm...>> wrote: On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...<mailto:wal...@gm...>> wrote: > My code like this in django: http://pastebin.com/nzM5jvuc Are you perhaps suffering from integer division? How about dividing by 1000.0, instead of 1000? Angus. > i'm lost > > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...<mailto:PH...@ge...>> wrote: >> >> Make sure that you're dividing by 1000.0 (as opposed to 1000) to avoid any >> integer nonsense and make sure to reset your axis limits. >> >> >> >> Posting a small code snippet would help us get you on the right track. >> >> -p >> >> >> >> From: Waléria Antunes David [mailto:wal...@gm...<mailto:wal...@gm...>] >> Sent: Monday, July 26, 2010 9:32 AM >> To: Matthieu Brucher >> Cc: mat...@li...<mailto:mat...@li...> >> Subject: Re: [Matplotlib-users] Hz to KHz >> >> >> >> I know...I tried but I'm using django and also when divided by 1000 the >> image does not appear... >> I don't know what to do.....help me.... >> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher >> <mat...@gm...<mailto:mat...@gm...>> wrote: >> >> Hi, >> >> You may just divide them by 1000? >> >> Matthieu >> >> 2010年7月26日 Waléria Antunes David <wal...@gm...<mailto:wal...@gm...>>: >> >> > Hello all, >> > >> > I need to format the values of graphic to KHz.....my values are in Hz >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , >> > but >> > I need to go where it will be displayed KHz: 3.0 3.1 >> > >> > can someone help me? >> >> > >> > ------------------------------------------------------------------------------ >> > The Palm PDK Hot Apps Program offers developers who use the >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> > of 1ドル Million in cash or HP Products. Visit us here for more details: >> > http://ad.doubleclick.net/clk;226879339;13503038;l? >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li...<mailto:Mat...@li...> >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> > >> >> >> >> -- >> Information System Engineer, Ph.D. >> Blog: http://matt.eifelle.com >> LinkedIn: http://www.linkedin.com/in/matthieubrucher >> >> > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of 1ドル Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li...<mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh
i don't understand.. On Mon, Jul 26, 2010 at 1:57 PM, Angus McMorland <am...@gm...> wrote: > On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...> > wrote: > > My code like this in django: http://pastebin.com/nzM5jvuc > > Are you perhaps suffering from integer division? How about dividing by > 1000.0, instead of 1000? > > Angus. > > > i'm lost > > > > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: > >> > >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid > any > >> integer nonsense and make sure to reset your axis limits. > >> > >> > >> > >> Posting a small code snippet would help us get you on the right track. > >> > >> -p > >> > >> > >> > >> From: Waléria Antunes David [mailto:wal...@gm...] > >> Sent: Monday, July 26, 2010 9:32 AM > >> To: Matthieu Brucher > >> Cc: mat...@li... > >> Subject: Re: [Matplotlib-users] Hz to KHz > >> > >> > >> > >> I know...I tried but I'm using django and also when divided by 1000 the > >> image does not appear... > >> I don't know what to do.....help me.... > >> > >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher > >> <mat...@gm...> wrote: > >> > >> Hi, > >> > >> You may just divide them by 1000? > >> > >> Matthieu > >> > >> 2010年7月26日 Waléria Antunes David <wal...@gm...>: > >> > >> > Hello all, > >> > > >> > I need to format the values of graphic to KHz.....my values are in Hz > >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400 > , > >> > but > >> > I need to go where it will be displayed KHz: 3.0 3.1 > >> > > >> > can someone help me? > >> > >> > > >> > > ------------------------------------------------------------------------------ > >> > The Palm PDK Hot Apps Program offers developers who use the > >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > >> > of 1ドル Million in cash or HP Products. Visit us here for more details: > >> > http://ad.doubleclick.net/clk;226879339;13503038;l? > >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > >> > _______________________________________________ > >> > Matplotlib-users mailing list > >> > Mat...@li... > >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > >> > > >> > >> > >> > >> -- > >> Information System Engineer, Ph.D. > >> Blog: http://matt.eifelle.com > >> LinkedIn: http://www.linkedin.com/in/matthieubrucher > >> > >> > > > > > ------------------------------------------------------------------------------ > > The Palm PDK Hot Apps Program offers developers who use the > > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > > of 1ドル Million in cash or HP Products. Visit us here for more details: > > http://ad.doubleclick.net/clk;226879339;13503038;l? > > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > AJC McMorland > Post-doctoral research fellow > Neurobiology, University of Pittsburgh >
On 26 July 2010 12:47, Waléria Antunes David <wal...@gm...> wrote: > My code like this in django: http://pastebin.com/nzM5jvuc Are you perhaps suffering from integer division? How about dividing by 1000.0, instead of 1000? Angus. > i'm lost > > On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: >> >> Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid any >> integer nonsense and make sure to reset your axis limits. >> >> >> >> Posting a small code snippet would help us get you on the right track. >> >> -p >> >> >> >> From: Waléria Antunes David [mailto:wal...@gm...] >> Sent: Monday, July 26, 2010 9:32 AM >> To: Matthieu Brucher >> Cc: mat...@li... >> Subject: Re: [Matplotlib-users] Hz to KHz >> >> >> >> I know...I tried but I'm using django and also when divided by 1000 the >> image does not appear... >> I don't know what to do.....help me.... >> >> On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher >> <mat...@gm...> wrote: >> >> Hi, >> >> You may just divide them by 1000? >> >> Matthieu >> >> 2010年7月26日 Waléria Antunes David <wal...@gm...>: >> >> > Hello all, >> > >> > I need to format the values of graphic to KHz.....my values are in Hz >> > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , >> > but >> > I need to go where it will be displayed KHz: 3.0 3.1 >> > >> > can someone help me? >> >> > >> > ------------------------------------------------------------------------------ >> > The Palm PDK Hot Apps Program offers developers who use the >> > Plug-In Development Kit to bring their C/C++ apps to Palm for a share >> > of 1ドル Million in cash or HP Products. Visit us here for more details: >> > http://ad.doubleclick.net/clk;226879339;13503038;l? >> > http://clk.atdmt.com/CRS/go/247765532/direct/01/ >> > _______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > >> > >> >> >> >> -- >> Information System Engineer, Ph.D. >> Blog: http://matt.eifelle.com >> LinkedIn: http://www.linkedin.com/in/matthieubrucher >> >> > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of 1ドル Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- AJC McMorland Post-doctoral research fellow Neurobiology, University of Pittsburgh
My code like this in django: http://pastebin.com/nzM5jvuc i'm lost On Mon, Jul 26, 2010 at 1:42 PM, <PH...@ge...> wrote: > Make sure that you’re dividing by 1000.0 (as opposed to 1000) to avoid > any integer nonsense and make sure to reset your axis limits. > > > > Posting a small code snippet would help us get you on the right track. > > -p > > > > *From:* Waléria Antunes David [mailto:wal...@gm...] > *Sent:* Monday, July 26, 2010 9:32 AM > *To:* Matthieu Brucher > *Cc:* mat...@li... > *Subject:* Re: [Matplotlib-users] Hz to KHz > > > > I know...I tried but I'm using django and also when divided by 1000 the > image does not appear... > I don't know what to do.....help me.... > > On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher < > mat...@gm...> wrote: > > Hi, > > You may just divide them by 1000? > > Matthieu > > 2010年7月26日 Waléria Antunes David <wal...@gm...>: > > > Hello all, > > > > I need to format the values of graphic to KHz.....my values are in Hz > > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , > but > > I need to go where it will be displayed KHz: 3.0 3.1 > > > > can someone help me? > > > > ------------------------------------------------------------------------------ > > The Palm PDK Hot Apps Program offers developers who use the > > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > > of 1ドル Million in cash or HP Products. Visit us here for more details: > > http://ad.doubleclick.net/clk;226879339;13503038;l? > > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > Information System Engineer, Ph.D. > Blog: http://matt.eifelle.com > LinkedIn: http://www.linkedin.com/in/matthieubrucher > > >
It sounds like you're wanting a gaussian kernel density estimate (KDE) (not the desktop!). The other options you mentioned are for interpolation, and are not at all what you're wanting to do. You can use scipy.stats.kde.gaussian_kde()<http://www.scipy.org/doc/api_docs/SciPy.stats.kde.gaussian_kde.html>. However, it currently doesn't take a weights array, so you'll need to modify it for your use case. If you prefer, I have faster version of a gaussian KDE that can take a weights array. It's actually slower than the scipy's gaussian kde for a low number of points, but for hundreds, thousands, or millions of points, it's several orders of magnitude faster. (Though the speedup depends on the covariance of the points... higher covariance = slower, generally speaking) Here's a quick pastebin of the code. http://pastebin.com/LNdYCZgw To use it, you do something like the below... (assuming the code in the pastebin is saved in a file called fast_kde.py) import numpy as np import matplotlib.pyplot as plt from fast_kde import fast_kde # From your description of your data... weights, x, y = np.loadtxt('chain.txt', usecols=(0,4,6)).T kde_grid = fast_kde(x, y, gridsize=(200,200), weights=weights) # Plot the grid plt.figure() plt.imshow(kde_grid, extent=(x.min(), x.max(), y.max(), y.min()) # Reverse the y-axis plt.gca().invert_yaxis() plt.show() Hope that helps a bit, -Joe On Sat, Jul 24, 2010 at 3:56 AM, montefra <fra...@go...>wrote: > > Hi, > > I am writing a program that reads three columns (one column containing the > weights, the other two containing the values I want to plot) from a file > containing the results from a MonteCarlo Markov Chain. The file contains > thousends of lines. Then create the 2D histogram and make contourplots. > Here > is a sample of the code (I don't know if is correct, it's just to show what > I do) > > >>> import numpy as np > >>> import matplotlib.pyplot as mplp > >>> chain = np.loadtxt("chain.txt", usecols=[0,4,6]) #read columns 0 (the > >>> weights), 4 and 6 (the data), from the file "chain.txt" > >>> h2D, xe, ye = np.histogram2D(chain[:,1],chain[:,2], weights=chain[:,0]) > >>> #create the 2D histogram > >>> x = (xe[:-1] + xe[1:])/2. #x and y values for the plot (I use the mean > >>> of each bin) > >>> y = (ye[:-1] + ye[1:])/2. > >>> mplp.figure() #open the figure > >>> mplp.contourf(x, y, h2D.T, origin='lower') #contour plot > > As it is the contours are not smooth and they look not that nice. After > days > of searches I've found three methods and tried, unsuccesfully, to apply > them > 1) 2d interpolation: I got "segmentation fault" (on a quadcore machine with > 8Gb of RAM) > 2) Rbf (radial basis functions): I got wrong contours > 3) ndimage: it creates spurious features (like secondary peaks parallel to > the direction of the main one) > > Before beginning with Python, I used to use IDL to plot, and there is a > function 'smooth' that smooth for you 2D histograms. I haven't found > anything similar for Python. > Does anyone have an idea or suggestion on how to do it? > > Thank in advance > Francesco > > -- > View this message in context: > http://old.nabble.com/Smooth-contourplots-tp29253884p29253884.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of 1ドル Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
I know...I tried but I'm using django and also when divided by 1000 the image does not appear... I don't know what to do.....help me.... On Mon, Jul 26, 2010 at 1:27 PM, Matthieu Brucher < mat...@gm...> wrote: > Hi, > > You may just divide them by 1000? > > Matthieu > > 2010年7月26日 Waléria Antunes David <wal...@gm...>: > > Hello all, > > > > I need to format the values of graphic to KHz.....my values are in Hz > > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , > but > > I need to go where it will be displayed KHz: 3.0 3.1 > > > > can someone help me? > > > ------------------------------------------------------------------------------ > > The Palm PDK Hot Apps Program offers developers who use the > > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > > of 1ドル Million in cash or HP Products. Visit us here for more details: > > http://ad.doubleclick.net/clk;226879339;13503038;l? > > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > > -- > Information System Engineer, Ph.D. > Blog: http://matt.eifelle.com > LinkedIn: http://www.linkedin.com/in/matthieubrucher >
Hi, You may just divide them by 1000? Matthieu 2010年7月26日 Waléria Antunes David <wal...@gm...>: > Hello all, > > I need to format the values of graphic to KHz.....my values are in Hz > see at idle python it displays the values as: 3000 3050 3100 .... 3400 , but > I need to go where it will be displayed KHz: 3.0 3.1 > > can someone help me? > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of 1ドル Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Information System Engineer, Ph.D. Blog: http://matt.eifelle.com LinkedIn: http://www.linkedin.com/in/matthieubrucher
Hello all, I need to format the values of graphic to KHz.....my values are in Hz see at idle python it displays the values as: 3000 3050 3100 .... 3400 , but I need to go where it will be displayed KHz: 3.0 3.1 can someone help me?
Hi, thank you for your quick answers which pointed me to a solution: setting clip_on=False solves the problem: pylab.imshow(d, extent=(-pi,pi,-pi/2,pi/2), clip_on=False) However, for me it feels not very intuitive to write clip_on=False to activate the desired clipping. Tobias
On Sat, Jul 24, 2010 at 1:51 PM, Josh Lawrence <jos...@gm...>wrote: > Hello, > > I looked on your website for the different line styles. In the > documentation for matplotlib.lines.line2D.set_linestyle, the dashed > linestyle is listed as '-' and not '--'. It it my understanding that > dashed should be '--'. If I'm incorrect, sorry for the noise. > > Cheers, > > -- > Josh Lawrence > Ph.D. Student > Clemson University > > > Looks like the formatter for the online documentation took the double-dash to mean a "long line", much like how LaTeX does. Anybody know how to make the double-dash appear as two distinct dashes? http://matplotlib.sourceforge.net/api/artist_api.html?highlight=set_linestyle#matplotlib.lines.Line2D.set_linestyle Ben Root
On Sat, Jul 24, 2010 at 4:57 AM, eck naysmith <eck...@ho...> wrote: > Hello, > > I've installed the following Python packages on a Windows XP machine: > > Python 2.6.5 > > Python 2.6 numpy-1.4.1 > > Python 2.6 matplotlib-0.99.3 [installer - matplotlib-0.99.3.win32-py2.6] > > Python and Numpy work correctly. Matplotlib also works and as a test I > tried successfully the following on the python interpretor: > > from matplotlib.pyplot import * > plot([1,2,3]) > show() > > A graph then appears and thus so far so good. > > However, when I try to run a certain python script, a problem occurs when > importing from matplotlib: > > Traceback (most recent call last): > > File "C:\Pythoncode\Games\Bridge_war_2\unitload2.py", line 2, in <module> > > from matplotlib.pyplot import plot, ylabel,xlabel, show > > File "C:\Python26\lib\site-packages\matplotlib\pyplot.py", line 78, in > <module> > > new_figure_manager, draw_if_interactive, show = pylab_setup() > > File "C:\Python26\lib\site-packages\matplotlib\backends\__init__.py", line > 25, in pylab_setup > > globals(),locals(),[backend_name]) > > File "C:\Python26\lib\site-packages\matplotlib\backends\backend_tkagg.py", > line 7, in <module> > > import Tkinter as Tk, FileDialog > > File "C:\Python26\lib\lib-tk\FileDialog.py", line 12, in <module> > > from Dialog import Dialog > > File "C:\Pythoncode\Games\Bridge_war_2\Dialog.py", line 2, in <module> > > import wx > > ImportError: No module named wx > > > The error is that your Windows XP box does not have the wxPython module installed for Windows. http://www.wxpython.org/download.php I hope that helps, Ben Root
Hello all, I need to format the values of graphic to KHz.....my values are in Hz see at idle python it displays the values as: 3000 3050 3100 .... 3400 , but I need to go where it will be displayed KHz: 3.0 3.1 can someone help me? On Thu, Jul 15, 2010 at 10:48 AM, < mat...@li...> wrote: > Send Matplotlib-users mailing list submissions to > mat...@li... > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > or, via email, send a message with subject or body 'help' to > mat...@li... > > You can reach the person managing the list at > mat...@li... > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Matplotlib-users digest..." > > > Today's Topics: > > 1. scientific notation (Wal?ria Antunes David) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: 2010年7月15日 10:41:52 -0300 > From: Wal?ria Antunes David <wal...@gm...> > Subject: [Matplotlib-users] scientific notation > To: mat...@li... > Message-ID: > <AAN...@ma...> > Content-Type: text/plain; charset="iso-8859-1" > > Hi all, > > I have a code base so that: > > > from pylab import * > x = arange (3000,3400) > y = -108 * (3.0e14 ** 2)/x**2 > > pylab..title("Teste") > pylab.savefig("imagem.png") > plot(x, y) > > > Well.... the values of the function range(3000,3400) are in Hz......i need > to pass GHz which would be in scientific notation as follows bellow: > > 3000 Hz = 3,0 ? 10-6 GHz > 3400 Hz = 3,4 x 10-6 Ghz > > How do I make the graph x-axis is shown in figures > scientific notation, for this currently so > > 3000,3050,3100,....,3400 > > in scientific notation is: (3.0e-6, 3.4e-6) > > Can someone help me? > > See my attachment.... > > I need to show this values in scientific notation...... > > Wal?ria > -------------- next part -------------- > An HTML attachment was scrubbed... > -------------- next part -------------- > A non-text attachment was scrubbed... > Name: current_image.jpg > Type: image/jpeg > Size: 35656 bytes > Desc: not available > > ------------------------------ > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > > ------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > End of Matplotlib-users Digest, Vol 50, Issue 37 > ************************************************ >
Hi, I am writing a program that reads three columns (one column containing the weights, the other two containing the values I want to plot) from a file containing the results from a MonteCarlo Markov Chain. The file contains thousends of lines. Then create the 2D histogram and make contourplots. Here is a sample of the code (I don't know if is correct, it's just to show what I do) >>> import numpy as np >>> import matplotlib.pyplot as mplp >>> chain = np.loadtxt("chain.txt", usecols=[0,4,6]) #read columns 0 (the >>> weights), 4 and 6 (the data), from the file "chain.txt" >>> h2D, xe, ye = np.histogram2D(chain[:,1],chain[:,2], weights=chain[:,0]) >>> #create the 2D histogram >>> x = (xe[:-1] + xe[1:])/2. #x and y values for the plot (I use the mean >>> of each bin) >>> y = (ye[:-1] + ye[1:])/2. >>> mplp.figure() #open the figure >>> mplp.contourf(x, y, h2D.T, origin='lower') #contour plot As it is the contours are not smooth and they look not that nice. After days of searches I've found three methods and tried, unsuccesfully, to apply them 1) 2d interpolation: I got "segmentation fault" (on a quadcore machine with 8Gb of RAM) 2) Rbf (radial basis functions): I got wrong contours 3) ndimage: it creates spurious features (like secondary peaks parallel to the direction of the main one) Before beginning with Python, I used to use IDL to plot, and there is a function 'smooth' that smooth for you 2D histograms. I haven't found anything similar for Python. Does anyone have an idea or suggestion on how to do it? Thank in advance Francesco -- View this message in context: http://old.nabble.com/Smooth-contourplots-tp29253884p29253884.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Sun, Jul 25, 2010 at 5:04 PM, John Hunter <jd...@gm...> wrote: > On Sun, Jul 25, 2010 at 3:14 PM, Benjamin Root <ben...@ou...> wrote: > > I tried a bunch of the animation examples and widget examples with and > > without the patch. I could not find one that was affected by this bug, > > however, none of them were adversely affected by the patch. However, > both > > of the plot_moves.py scripts were improved by the patch. > > Since this is a bugfix, it should go into the 1.0 release branch and > then merged into the trunk using svnmerge. Are you familar with this > (it's described in the coding guide). If so, would you mind > committing this? > > Thanks for the testing Ben and the patch João > > JDH > Sure, I can commit it. committed to v1.0 branch as r8575 and merged with trunk as r8576. Ben Root
Ben, your code fixed the shading problem, but it did not change anything on the clipping error. I also found that changing the cstride/rstride helps 'sometimes'. But also does changing the linewidth. The problem is consistency with my loop... I understand this is a bug that is not easy to fix. It would be totally sufficient for me if I could only find some parameters that'll always work. But this is not the case. Since there is no random procedure in the code there must be some footprint so that the starting parameters are not the same all the time. Maybe it is a memory thing and I have just to clear a cache/display buffer or something? Benjamin Root-2 wrote: > > > arsbor, > > Actually, in your case, I think the issue was also caused by the bad array > construction and plot_surface() was getting bad data depending on the > strides. There is no random number generator in the code-path, so > *something* must change. I noticed that it would happen as I changed the > cstride/rstride values for the top cover (before I had fixed the top > cover). If you still notice the issue now, let me know and I will look > into > it further, but it shouldn't be happening for you. > > Ben Root > > > > -- View this message in context: http://old.nabble.com/plot_surface-shading-and-clipping-error-tp29254649p29262268.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On Sun, Jul 25, 2010 at 3:14 PM, Benjamin Root <ben...@ou...> wrote: > I tried a bunch of the animation examples and widget examples with and > without the patch. I could not find one that was affected by this bug, > however, none of them were adversely affected by the patch. However, both > of the plot_moves.py scripts were improved by the patch. Since this is a bugfix, it should go into the 1.0 release branch and then merged into the trunk using svnmerge. Are you familar with this (it's described in the coding guide). If so, would you mind committing this? Thanks for the testing Ben and the patch João JDH
On Sat, Jul 24, 2010 at 3:11 PM, John Hunter <jd...@gm...> wrote: > On Sat, Jul 24, 2010 at 1:56 PM, Benjamin Root <ben...@ou...> wrote: > > On Sat, Jul 24, 2010 at 12:17 PM, João Luís Silva <js...@fc...> > wrote: > >> > >> On 07/13/2010 02:31 AM, John Hunter wrote: > >>> > >>> On Mon, Jul 12, 2010 at 8:05 PM, John Hunter<jd...@gm...> > wrote: > >>>> > >>>> All of which is discouraging: we both see bugs but different ones on > >>>> linux, the appearance of the bug is caused by adding a combobox which > >>>> is not used (on my system), the bug appears on some platforms (linux) > >>>> but not others (win) and it appears for both gtk and gtkagg. > >>> > >>> The last thing I'll add for now is that my bug, the black pixel noise > >>> (fills the axes window when motion starts in a zoom-to-rect event) > >>> which may be unrelated to your bug, is happening in > >>> backend_gtk.NavigationToolbar2GTK.draw_rubberband in the pair of > >>> calls: > >>> > >>> # this is used to copy the background that the zoom to rect > >>> "rubberband" will be drawn over > >>> self._imageBack = axrect, drawable.get_image(*axrect) > >>> > >>> # this is used to restore the background before redrawing the > >>> rectangle for the zoom box > >>> drawable.draw_image(gc, imageBack, 0, 0, *lastrect) > >>> > >>> Since the bug is only exposed when a combo box is added to the > >>> hierarchy, and appears to be platform or gtk specific, I'm suspecting > >>> a gtk bug at this point. But I don't have anything conclusive or a > >>> minimal example which I could use to post to the gtk list. The mpl > >>> calls and values (axrect, lastrect, etc) look correct on inspection. > >>> Somehow the call to drawable.get_image is getting a buffer full of > >>> noise if and only if the combobox is added to the vbox. > >>> > >>> JDH > >> > >> >From what I could understand from the pygtk documentation get_image / > >> draw_image are client-side operations. In particular: > >> > >> "If the source drawable is a Gdk::Window and partially offscreen or > >> obscured, then the obscured portions of the returned image will contain > >> undefined data." > >> > >> Anyway they recommend using Pixmap, which is server-side and a offscreen > >> drawable. I've attached a patch that replaces the get_image / draw_image > >> with Pixmap operations and fixes this bug. I've tested this patch on > Linux > >> and Windows. > >> > >> Regards, > >> João Luís > > > > The patch works for me. I am using the mpl from svn. > > Have you tested with any of the animation and blit examples? How > about some of the widget examples? If all these work for you, I > suggest committing it to the branch and merging to the trunk. > > Thanks, > JDH > I tried a bunch of the animation examples and widget examples with and without the patch. I could not find one that was affected by this bug, however, none of them were adversely affected by the patch. However, both of the plot_moves.py scripts were improved by the patch. Ben Root
On Sun, Jul 25, 2010 at 1:27 PM, Satish Raghunath <qg...@my...>wrote: > Hi > I got this error when I was trying to build the matplot lib .src/backend_gdk.c:8:25: error: pygtk/pygtk.h: No such file or directory > src/backend_gdk.c: In function âpixbuf_get_pixels_arrayâ: > src/backend_gdk.c:18: error: âPyGObjectâ undeclared (first use in this > function) > src/backend_gdk.c:18: error: (Each undeclared identifier is reported only > once > src/backend_gdk.c:18: error: for each function it appears in.) > src/backend_gdk.c:18: error: âpy_pixbufâ undeclared (first use in this > function) > src/backend_gdk.c:19: error: âGdkPixbufâ undeclared (first use in this > function) > src/backend_gdk.c:19: error: âgdk_pixbufâ undeclared (first use in this > function > > i tried to install pygtk-2.12.0 and pygobject- 2.12.1 but I got the error > No package 'pygobject-2.0' found > > can anyone please explain me the above errors > > Thanks! > Satish > > Satish, Perhaps it would be useful to first read up on RHEL 4 (and Linux in general) package managers: http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/sysadmin-guide/ch-rpm.html In a link I have provided in a previous email, it contains a list of packages you should ensure are installed on your system before attempting to build matplotlib. In this case, you are missing some of the development libraries for pygtk. In addition, given the amount of difficulties you are having with installing matplotlib, you might want to consider Enthought's Python Distribution (often called EPD) to help make the entire process easier for you. http://enthought.com/products/epd.php Ben Root
Hi I got this error when I was trying to build the matplot lib .src/backend_gdk.c:8:25: error: pygtk/pygtk.h: No such file or directory src/backend_gdk.c: In function âpixbuf_get_pixels_arrayâ: src/backend_gdk.c:18: error: âPyGObjectâ undeclared (first use in this function) src/backend_gdk.c:18: error: (Each undeclared identifier is reported only once src/backend_gdk.c:18: error: for each function it appears in.) src/backend_gdk.c:18: error: âpy_pixbufâ undeclared (first use in this function) src/backend_gdk.c:19: error: âGdkPixbufâ undeclared (first use in this function) src/backend_gdk.c:19: error: âgdk_pixbufâ undeclared (first use in this function i tried to install pygtk-2.12.0 and pygobject- 2.12.1 but I got the error No package 'pygobject-2.0' found can anyone please explain me the above errors Thanks! Satish
On Sun, Jul 25, 2010 at 1:55 AM, Satish Raghunath <qg...@my...>wrote: > Hi > I am getting this error* > File "aerialvision1.py", line 79, in <module> > import startup > File "/home/satish/gpgpusim/gpgpu-sim_v2.1.1b/aerialvision/startup.py", > line 68, in <module> > import guiclasses > File > "/home/satish/gpgpusim/gpgpu-sim_v2.1.1b/aerialvision/guiclasses.py", line > 68, in <module> > matplotlib.use('TkAgg') > AttributeError: 'module' object has no attribute 'use' > > " AttributeError: 'module' object has no attribute 'use' " * > > Can anyone please explain me this error > > Thanks! > Satish > > It means the authors of gpgpu-sim_v2.1.1b made a mistake and did not import matplotlib in guiclasses.py. Contact them about the bug. Ben Root
On Sun, Jul 25, 2010 at 5:19 AM, arsbbr <ar...@gm...> wrote: > > Thanks, this was quite a tiny weekend project for you :) > I'll keep you tip in mind. > > Concerning the foreground/background issue: The problem here seems quite > random. It does not depend on the viewing angle. I rather just have to be > lucky everytime the plot command is executed. > If the plotting went right, I can rotate everything without any errors. > > I'm by no means a coder, but I find it hard to understand that executing > the > same script leads to a different outcome. My plan is to make a movie of the > cylinder while shrinking. If the problem would > just depend on the viewing angle, I would find a 'good angle', make it > constant and start the loop. But at the moment the outcome is just > arbitrary. > > Regards, > arsbbr > > arsbor, Actually, in your case, I think the issue was also caused by the bad array construction and plot_surface() was getting bad data depending on the strides. There is no random number generator in the code-path, so *something* must change. I noticed that it would happen as I changed the cstride/rstride values for the top cover (before I had fixed the top cover). If you still notice the issue now, let me know and I will look into it further, but it shouldn't be happening for you. Ben Root
Thanks, this was quite a tiny weekend project for you :) I'll keep you tip in mind. Concerning the foreground/background issue: The problem here seems quite random. It does not depend on the viewing angle. I rather just have to be lucky everytime the plot command is executed. If the plotting went right, I can rotate everything without any errors. I'm by no means a coder, but I find it hard to understand that executing the same script leads to a different outcome. My plan is to make a movie of the cylinder while shrinking. If the problem would just depend on the viewing angle, I would find a 'good angle', make it constant and start the loop. But at the moment the outcome is just arbitrary. Regards, arsbbr Benjamin Root-2 wrote: > > On Sat, Jul 24, 2010 at 2:46 PM, arsbbr <ar...@gm...> wrote: > > > > The thing to keep in mind when creating a surface in 3d is that the data > needs to be considered as parameterizable in 2D and constructed as such. > > I hope that helps, > > Ben Root > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/plot_surface-shading-and-clipping-error-tp29254649p29259207.html Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi I am getting this error* File "aerialvision1.py", line 79, in <module> import startup File "/home/satish/gpgpusim/gpgpu-sim_v2.1.1b/aerialvision/startup.py", line 68, in <module> import guiclasses File "/home/satish/gpgpusim/gpgpu-sim_v2.1.1b/aerialvision/guiclasses.py", line 68, in <module> matplotlib.use('TkAgg') AttributeError: 'module' object has no attribute 'use' " AttributeError: 'module' object has no attribute 'use' " * Can anyone please explain me this error Thanks! Satish
On Sat, Jul 24, 2010 at 8:08 PM, Satish Raghunath <qg...@my...>wrote: > Hi, > I am getting this error when using matplot . No module named _tkagg . Can > anyone please tell me about this error and what does tkagg mean . > Thanks! > Satish > > Satish, this error occurs if you build matplotlib from source without having the tk development libraries installed on your system. Tk is the short name for Tkinter, which is the GUI system for Python. If you intended to use gtk, qt, or wx, then you would have to specify it in your configuration file. For any of these GUI systems, you will need the development files installed. http://matplotlib.sourceforge.net/users/installing.html#installing-from-source I hope this helps, Ben Root