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
(20) |
2
(21) |
3
(21) |
4
(14) |
5
(8) |
6
(12) |
7
(16) |
8
(27) |
9
(39) |
10
(19) |
11
(12) |
12
(3) |
13
(3) |
14
(18) |
15
(14) |
16
(6) |
17
(7) |
18
(19) |
19
(5) |
20
(8) |
21
(24) |
22
(42) |
23
(12) |
24
(11) |
25
(16) |
26
(2) |
27
(4) |
28
(10) |
|
|
|
|
|
Hi Waléria, you should try to figure out the docstring help :) In a terminal (IDLE or IPython), just do import matplotlib matplotlib.errobar? This will show you extensive help on the command. You will also need to compare with the regular plot command: matplotlib.plot? Best regards, Daniel P.S. I cannot see what is wrong with your line. Change 'r' to 'b' and the plot should be in blue. 2011年2月22日 Waléria Antunes David <wal...@gm...>: > Hi all, > > I have this line about errorbar plot, but i need a errorbar this: > http://img14.imageshack.us/i/exampled.jpg/ (in blue) > > My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2, > marker='_', linestyle='', markeredgecolor='r',color='r', label='Pontos') > > Can you help me? > > Thanks, > > ------------------------------------------------------------------------------ > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk > Collect, index and harness all the fast moving IT data generated by your > applications, servers and devices whether physical, virtual or in the cloud. > Deliver compliance at lower cost and gain new business insights. > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hi all, I have this line about errorbar plot, but i need a errorbar this: http://img14.imageshack.us/i/exampled.jpg/ (in blue) My line about errorbar: plt.errorbar(x, y, yerr=e, capsize=6, elinewidth=2, marker='_', linestyle='', markeredgecolor='r',color='r', label='Pontos') Can you help me? Thanks,
On Tue, Feb 15, 2011 at 11:07 PM, Victor Hooi <vic...@ya...> wrote: > heya, > > Is there an easy way to colour-code a Matplotlib histogram with a single > set of data? > > So for example, you'd have a bell-shaped histogram, and the middle 50% > might be green, the regions 20% to the left and right of that might be > yellow, and the 5% either side beyond that could be red. > > I couldn't seem to find anything in the Matplotlib options for this - any > suggestions? > > Cheers, > Victor > > Sure, check out the following: import matplotlib.pyplot as plt import numpy as np xs = np.arange(20) ys = np.random.rand(20) cs = (['y'] * round(0.25 * len(xs))) + (['g'] * round(0.5 * len(xs))) + (['y'] * round(0.25 * len(xs))) plt.bar(xs, ys, color=cs) plt.show() Admittedly, this isn't using matplotlib's hist() function because it only allows for one color per dataset. However, you can use numpy's histogram function to get the bins and counts yourself, and then use bar() to make the bars. bar() will allow you to color the bars individually. I hope this helps! Ben Root
On Sun, Feb 20, 2011 at 9:22 PM, Bruno George <bge...@gm...>wrote: > Both Python 2.6 and Python 2.7 Windows and Mac > > I've been running a very simple plotting script with Mac OSX 10.5.8 and > Windows XP Professional Version 2002, Service Pack 3 using a large, > 10,000,000 element .csv file. I ran both scripts locally with the data in > the same local directory as the script. > > The Python version on the Mac is: > Python 2.6.6 (r266:84374, Aug 31 2010, 11:00:51) > [GCC 4.0.1 (Apple Inc. build 5493)] on darwin > Type "copyright", "credits" or "license()" for more information. > > **************************************************************** > Personal firewall software may warn about the connection IDLE > makes to its subprocess using this computer's internal loopback > interface. This connection is not visible on any external > interface and no data is sent to or received from the Internet. > **************************************************************** > > IDLE 2.6.6 > >>> ================================ RESTART > ================================ > >>> > Now its: Sun Feb 20 17:18:10 2011 > 1298251090.64 > slorping > It took 414.0 seconds to slorp in an array containing 10000000 elements. > > on Windows: > > Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit > (Intel)] on win32 > Type "copyright", "credits" or "license()" for more information. > > **************************************************************** > Personal firewall software may warn about the connection IDLE > makes to its subprocess using this computer's internal loopback > interface. This connection is not visible on any external > interface and no data is sent to or received from the Internet. > **************************************************************** > > IDLE 2.6.6 > >>> ================================ RESTART > ================================ > >>> > Now its: Sun Feb 20 18:25:41 2011 > 1298255141.56 > slorping > It took 169.0 seconds to slorp in an array containing 10000000 elements. > > Now its: Sun Feb 20 18:28:30 2011 > > ************************************************ > > The script and the data are identical: > > > import time as ti > > from math import radians > > from pylab import plot, show > > > from numpy import loadtxt, ravel , shape > > ##################################################### > ###Timekeeping Stuff################################# > ##################################################### > > print 'Now its: ',ti.asctime() > > clockA = ti.time() > print clockA > > > ##################################################### > ###One Big Huge Flat Array########################### > ##################################################### > column = 0 > > x = () > raw = () > normal = () > checker = () > trigger = () > > print 'slorping' > > raw = loadtxt('DataLogger.csv', float, delimiter = 'n,') > x = ravel(raw) > ##normal = (x+.5807)*(2/3.) > > ################################################### > ###Just fun timing stuff############################ > ################################################### > > clockS = ti.time() > s = shape(x) > print 'It took',round(clockS-clockA), 'seconds to slorp in an array > containing',s[0], 'elements.' > print "" > print 'Now its: ',ti.asctime() > > > plot(x, 'k') > show() > > > ********************************************************************************* > > This script will plot consistently on the Mac and crashes every time on the > PC. I'm data logging at 100MZ and the card is on the PC desk side machine. > My Macbook Air doesn't have a PCI slot. I developed all of the scripts on > the Mac using data logged on the PC. I was hoping to integrate everything > onto the PC for efficiency. Is there a workaround I can use on the PC? > > Thanks, > > Bruno George > > The performance issue for reading those data files will be largely dependent on how fast the harddrives are on the machines. The crashing issue is likely due to Windows XP's memory allocation mechanism or running into the memory barrier for 32-bit machines. Is your Mac a 64-bit machine? If it is, then it is likely that getting a 64-bit Windows machine would address the crashing issue. To be sure, I would watch the memory usage of those scripts to see how high it gets. Ben Root
On Thu, Feb 17, 2011 at 3:56 AM, Matthias Wong <ark...@gm...> wrote: > Hi all, > > It's exactly as said. I am using OS 10.6 > > If I use ipython -pylab and later try to plot anything, the GUI for > plotting launches and I just get a beachball. > > However, if I do ipython and then import plot, I can do a plot with no > problem. > > I did a search but came up with nothing. I have this problem whether I use > apple python or the python2.7 downloaded from python.org. > > I am new to the whole terminal/programming thing. As you can imagine, > everything is very difficult. Any help is appreciated > > God bless, > Matthias > Most likely, ipython is trying to import a different (broken?) version of matplotlib than what python finds automatically. I would try re-installing ipython. Ben Root
On Fri, Feb 18, 2011 at 9:13 AM, JamesTan12 <lan...@ho...> wrote: > > Hi I have a list (Key values) with values I would like to plot to a > matplotlib histogram > > [('a', 155), ('c', 73), ('b', 19), ('e', 260), ('d', 73), ('g', 42), ('f', > 47), ('i', 175), ('h', 77), ('k', 7), ('j', 2), ('m', 76), ('l', 63), ('o', > 174), ('n', 145), ('q', 3), ('p', 61), ('s', 153), ('r', 143), ('u', 50), > ('t', 193), ('w', 19), ('v', 21), ('y', 55), ('x', 4), ('z', 4)] > > Can anyone suggest how do I go about to plot it into a histogram with > x-asix > being the key and y axis being the value.? > I would do something like the following: data = [('a', 155), ('c', 73), ('b', 19), ('e', 260), ('d', 73), ('g', 42), ('f', 47), ('i', 175), ('h', 77), ('k', 7), ('j', 2), ('m', 76), ('l', 63), ('o', 174), ('n', 145), ('q', 3), ('p', 61), ('s', 153), ('r', 143), ('u', 50), ('t', 193), ('w', 19), ('v', 21), ('y', 55), ('x', 4), ('z', 4)] x, y = zip(*data) xlocs = np.arange(len(x)) fig = plt.figure() ax = fig.gca() ax.bar(xlocs + 0.6, y) ax.set_xticks(xlocs + 1) ax.set_xticklabels(x) ax.set_xlim(0.0, xlocs.max() + 2) plt.show() The xlocs + 0.6 is to list the left edge of the bars so that they are centered on integer tick locations (the bars are 0.8 wide by default). The xlocs + 1 is to set the xaxis ticks at the center of each bar, and the xlocs.max() + 2 is to have enough room on the right hand side of your graph for everything. I hope that helps! Ben Root
2011年2月18日 Jason Stone <sto...@gm...> > Good afternoon all, > I'm developing a GUI using QT Designer 4 and Python 2.7. The GUI will need > to have several plots on it in order to show the data in the ways that I > need. To accomplish this I'm using the matplotlib widget from within QT > Designer. It all seems to work great, but I can't seem to find a way to > change the background color of the widget. Essentially, I've got a nicely > laid out GUI with the default QT Designer light gray as the "background > color". Then I've got these matplotlib widgets which by default have a > darker shade of gray/charcoal as their "background color". How do I change > the matplotlib widget bgcolor to the default light gray so as to match the > rest of the GUI? Turning the background of the main GUI to the dark gray to > match the matplotlib color is not an option. I kind of assumed the issue > has to do with the matplotlib widget and not with QT Designer, hence the > reason for posting in this mailing list. > > Does anyone have any thoughts regarding this? Or can you point me to a > documentation set that shows how to do this? > this<http://matplotlib.sourceforge.net/faq/howto_faq.html?highlight=codex%20transparent#save-transparent-figures>could help you. and it is named *Qt*. QT means quicktime.
On 2/22/2011 7:47 AM, Waléria Antunes David wrote: > I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing. Put it last, *after* all plotting. And since you won't be able to see your green line, don't plot it.
First, the python3k branch is completely experimental and only about 10% complete. If your expectation is to have something that just works, you'll want to wait a while. We're hoping to hold a sprint next month to make some more progress on it. If you're hoping to help us out with it, great! You'll want to check out from the new git repository here: https://github.com/matplotlib/matplotlib-py3 On 02/22/2011 03:52 AM, Markus1234 wrote: > Hello everyone, > > I tried to build > http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ with > Python 3.1.3 and get the following error message (whole output in the > attachement) > > In file included from CXX\IndirectPythonInterface.cxx:42:0: > CXX\/Python3/IndirectPythonInterface.cxx: In function 'PyObject* > Py::_Exc_MemoryErrorInst()': > CXX\/Python3/IndirectPythonInterface.cxx:452:50: error: > '::PyExc_MemoryErrorInst' has not been declared > CXX\/Python3/IndirectPythonInterface.cxx:452:75: warning: control reaches > end of non-void function > error: command 'gcc' failed with exit status 1 What platform/compiler are you on? I haven't seen this, but we've only worked the py3k branch on Linux so far. > Also can anyone help me how to 'correctly' configure freetypes2. I > downloaded and installed it and copied part of it from /Program > Files/GnuWin32/src/freetype/2.3.5/freetype-2.3.5\/include to > py3k/freetypes2/ > Is there a more elegant way to configure the setup correctly? Normally, in Unixy land "make install" would install the headers to /usr/local/include and the matplotlib build would pick them up there. Not sure how things are supposed to work in the GnuWin32 environment, though. Mike > Best regards, > > Markus http://old.nabble.com/file/p30947414/output.txt output.txt
Daniel, Thank you very much....the yscale is correct now.....this topic is resolved... Thanks.... On Tue, Feb 22, 2011 at 10:26 AM, Daniel Mader < dan...@go...> wrote: > Hi Waléria, > > in order to test it and help you without spending too much time on it, > could you please provide a stripped example which runs standalone? > > As a general rule you should set limits at the very end of the > plotting code in order to prevent them from being superseded by > another command! > > Thanks, > Daniel > > 2011年2月22日 Waléria Antunes David <wal...@gm...>: > > I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing. > See > > my code: http://pastebin.com/Jt3BTp0C (line 14) > > > > See my image generated - attached. > > > > thanks, > > > > On Tue, Feb 22, 2011 at 9:37 AM, Mike Kaufman <mc...@gm...> wrote: > >> > >> send me your data. > >> > >> M > >> > >> On 2/22/11 6:29 AM, Waléria Antunes David wrote: > >>> > >>> See this pdf attached....the yscale has these values: 1, 10, 100, 1000 > >>> ....I need this. My code: http://pastebin.com/HKCGQWez > >>> Can you help me, please?? > >>> > >>> Thanks, > >>> > >>> On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root <ben...@ou... > >>> <mailto:ben...@ou...>> wrote: > >>> > >>> > >>> > >>> On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David > >>> <wal...@gm... <mailto:wal...@gm...>> wrote: > >>> > >>> Can you help me...please. > >>> > >>> On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David > >>> <wal...@gm... <mailto:wal...@gm...>> > wrote: > >>> > >>> I don't understand...i need that the yscale has these > >>> values: 1,10,100,1000 ....But i don't know how... > >>> > >>> Thanks, > >>> > >>> > >>> > >>> Let me make it clearer. Your green line has values on the order of > >>> 10^-17. There is nothing that can be done to meet your request if > >>> you are plotting data this small. Either this data is wrong, or you > >>> don't want to plot it at all. > >>> > >>> To exclude anything less than 1, use the following: > >>> > >>> ax.set_ylim(bottom=1) > >>> > >>> Note that this will exclude the green line in your plot! > >>> > >>> Ben Root > >>> > >>> > >>> > >>> > >>> > >>> > ------------------------------------------------------------------------------ > >>> Index, Search& Analyze Logs and other IT data in Real-Time with Splunk > >>> Collect, index and harness all the fast moving IT data generated by > your > >>> applications, servers and devices whether physical, virtual or in the > >>> cloud. > >>> Deliver compliance at lower cost and gain new business insights. > >>> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > >>> > >>> > >>> > >>> _______________________________________________ > >>> Matplotlib-users mailing list > >>> Mat...@li... > >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >> > > > > > > > ------------------------------------------------------------------------------ > > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk > > Collect, index and harness all the fast moving IT data generated by your > > applications, servers and devices whether physical, virtual or in the > cloud. > > Deliver compliance at lower cost and gain new business insights. > > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > > _______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > >
Hi Waléria, in order to test it and help you without spending too much time on it, could you please provide a stripped example which runs standalone? As a general rule you should set limits at the very end of the plotting code in order to prevent them from being superseded by another command! Thanks, Daniel 2011年2月22日 Waléria Antunes David <wal...@gm...>: > I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing. See > my code: http://pastebin.com/Jt3BTp0C (line 14) > > See my image generated - attached. > > thanks, > > On Tue, Feb 22, 2011 at 9:37 AM, Mike Kaufman <mc...@gm...> wrote: >> >> send me your data. >> >> M >> >> On 2/22/11 6:29 AM, Waléria Antunes David wrote: >>> >>> See this pdf attached....the yscale has these values: 1, 10, 100, 1000 >>> ....I need this. My code: http://pastebin.com/HKCGQWez >>> Can you help me, please?? >>> >>> Thanks, >>> >>> On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root <ben...@ou... >>> <mailto:ben...@ou...>> wrote: >>> >>> >>> >>> On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David >>> <wal...@gm... <mailto:wal...@gm...>> wrote: >>> >>> Can you help me...please. >>> >>> On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David >>> <wal...@gm... <mailto:wal...@gm...>> wrote: >>> >>> I don't understand...i need that the yscale has these >>> values: 1,10,100,1000 ....But i don't know how... >>> >>> Thanks, >>> >>> >>> >>> Let me make it clearer. Your green line has values on the order of >>> 10^-17. There is nothing that can be done to meet your request if >>> you are plotting data this small. Either this data is wrong, or you >>> don't want to plot it at all. >>> >>> To exclude anything less than 1, use the following: >>> >>> ax.set_ylim(bottom=1) >>> >>> Note that this will exclude the green line in your plot! >>> >>> Ben Root >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Index, Search& Analyze Logs and other IT data in Real-Time with Splunk >>> Collect, index and harness all the fast moving IT data generated by your >>> applications, servers and devices whether physical, virtual or in the >>> cloud. >>> Deliver compliance at lower cost and gain new business insights. >>> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev >>> >>> >>> >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > > > ------------------------------------------------------------------------------ > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk > Collect, index and harness all the fast moving IT data generated by your > applications, servers and devices whether physical, virtual or in the cloud. > Deliver compliance at lower cost and gain new business insights. > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Do you want my complete code? Thanks, On Tue, Feb 22, 2011 at 10:17 AM, Mike Kaufman <mc...@gm...> wrote: > Look, something about your dataset is most likely causing this problem. > Send me the 5 data series you are using for this code, and I will attempt to > reproduce the plot (and then show you how I did it). > > M > > > On 2/22/11 7:47 AM, Waléria Antunes David wrote: > >> I tried what Ben said: ax.set_ylim(bottom=1) ..., but changed nothing. >> See my code: http://pastebin.com/Jt3BTp0C (line 14) >> >> See my image generated - attached. >> >> thanks, >> >> On Tue, Feb 22, 2011 at 9:37 AM, Mike Kaufman <mc...@gm... >> <mailto:mc...@gm...>> wrote: >> >> send me your data. >> >> M >> >> >> On 2/22/11 6:29 AM, Waléria Antunes David wrote: >> >> See this pdf attached....the yscale has these values: 1, 10, >> 100, 1000 >> ....I need this. My code: http://pastebin.com/HKCGQWez >> Can you help me, please?? >> >> Thanks, >> >> On Mon, Feb 21, 2011 at 4:41 PM, Benjamin Root <ben...@ou... >> <mailto:ben...@ou...> >> <mailto:ben...@ou... <mailto:ben...@ou...>>> wrote: >> >> >> >> On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David >> <wal...@gm... <mailto:wal...@gm...> >> <mailto:wal...@gm... >> >> <mailto:wal...@gm...>>> wrote: >> >> Can you help me...please. >> >> On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David >> <wal...@gm... <mailto:wal...@gm...> >> <mailto:wal...@gm... >> >> <mailto:wal...@gm...>>> wrote: >> >> I don't understand...i need that the yscale has these >> values: 1,10,100,1000 ....But i don't know how... >> >> Thanks, >> >> >> >> Let me make it clearer. Your green line has values on the >> order of >> 10^-17. There is nothing that can be done to meet your >> request if >> you are plotting data this small. Either this data is >> wrong, or you >> don't want to plot it at all. >> >> To exclude anything less than 1, use the following: >> >> ax.set_ylim(bottom=1) >> >> Note that this will exclude the green line in your plot! >> >> Ben Root >> >> >> >> >> >> ------------------------------------------------------------------------------ >> Index, Search& Analyze Logs and other IT data in Real-Time with >> Splunk >> Collect, index and harness all the fast moving IT data generated >> by your >> applications, servers and devices whether physical, virtual or >> in the cloud. >> Deliver compliance at lower cost and gain new business insights. >> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev >> >> >> >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >> >> >
Can you provide us with your script ? Thomas ********************** Thomas Lecocq Geologist Ph.D.Student (Seismology) Royal Observatory of Belgium ********************** > From: cb...@oz... > Date: 2011年2月22日 21:05:48 +1100 > To: mat...@li... > Subject: [Matplotlib-users] Can't produce plots using Matplotlib > > Recently I downloaded and installed Python(x,y) Version 2.6.5.6 running under Windows7 and now can't produce the plots that my programs produced under an earlier version of Python(x,y). The programs seem to run correctly and produce the same numerical results but I can't find the graphical output (if it exists). > I presume that the problem isn caused by either an incorrect use of Matplotlib, an installation issue or my simply misunderstanding the use of Spyder. > I would greatly appreciate some guidance on how to solve this problem. > ------------------------------------------------------------------------------ > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk > Collect, index and harness all the fast moving IT data generated by your > applications, servers and devices whether physical, virtual or in the cloud. > Deliver compliance at lower cost and gain new business insights. > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Recently I downloaded and installed Python(x,y) Version 2.6.5.6 running under Windows7 and now can't produce the plots that my programs produced under an earlier version of Python(x,y). The programs seem to run correctly and produce the same numerical results but I can't find the graphical output (if it exists). I presume that the problem isn caused by either an incorrect use of Matplotlib, an installation issue or my simply misunderstanding the use of Spyder. I would greatly appreciate some guidance on how to solve this problem.
Hi, there has been a similar question recently but I couldn't figure out if or how this is solved: I'd like to reduce the figure size so that I can add it to a LaTeX document without scaling (PDF output with LaTeX font rendering). For that, I need to adapt the font sizes, too. Unfortunately, the canvas is not properly scaled so that the axis labels and the possibly the tick marks are cut off. Is this a bug, feature, design flaw? How can I properly work around it, i.e. reduce the graph automatically for a given figsize/font size combination so that everything fits on the figure? An example follows to demonstrate, thanks in advance, Daniel import numpy,pylab,matplotlib.ticker as mtick x = numpy.linspace(0,10,1000) y = numpy.exp(x) pylab.rcdefaults() fig = pylab.figure() ax = fig.add_subplot(111) ax.set_yscale('log') ax.yaxis.set_major_formatter(mtick.FormatStrFormatter('%d')) ax.set_xlabel('asdf') ax.set_ylabel('qwer') ax.plot(x,y) fig.savefig('example_mpl-ticker_1') pylab.rcParams['figure.figsize'] = 5,3 pylab.rcParams['font.size'] = 12 fig = pylab.figure() ax = fig.add_subplot(111) ax.set_yscale('log') ax.yaxis.set_major_formatter(mtick.FormatStrFormatter('%d')) ax.set_xlabel('asdf') ax.set_ylabel('qwer') ax.plot(x,y) fig.savefig('example_mpl-ticker_2')
Hello everyone, I tried to build http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/branches/py3k/ with Python 3.1.3 and get the following error message (whole output in the attachement) In file included from CXX\IndirectPythonInterface.cxx:42:0: CXX\/Python3/IndirectPythonInterface.cxx: In function 'PyObject* Py::_Exc_MemoryErrorInst()': CXX\/Python3/IndirectPythonInterface.cxx:452:50: error: '::PyExc_MemoryErrorInst' has not been declared CXX\/Python3/IndirectPythonInterface.cxx:452:75: warning: control reaches end of non-void function error: command 'gcc' failed with exit status 1 Also can anyone help me how to 'correctly' configure freetypes2. I downloaded and installed it and copied part of it from /Program Files/GnuWin32/src/freetype/2.3.5/freetype-2.3.5\/include to py3k/freetypes2/ Is there a more elegant way to configure the setup correctly? Best regards, Markus http://old.nabble.com/file/p30947414/output.txt output.txt -- View this message in context: http://old.nabble.com/Building-matplotlib-py3k-branch-error-tp30947414p30947414.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On 02/21/2011 07:27 PM, Zhaoru Zhang wrote: > Hi, > > I tried to use contourf to plot an array in which the land values have been masked. However, I found that contourf did not deal with the masking properly. I would expect the masked region to be bounded by the separation line of land and sea, but it actually exceeds that line. I also tried with pcolor and this time the masking is handled correctly. Could anybody tell me what is the right way to use contourf for plotting masked arrays? Thanks! > What mpl version are you using? For a long time there was a deep-seated bug in handling masked regions, but about a year ago Ian Thomas fixed it. Eric > Zhaoru > ------------------------------------------------------------------------------ > Index, Search& Analyze Logs and other IT data in Real-Time with Splunk > Collect, index and harness all the fast moving IT data generated by your > applications, servers and devices whether physical, virtual or in the cloud. > Deliver compliance at lower cost and gain new business insights. > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hi, I tried to use contourf to plot an array in which the land values have been masked. However, I found that contourf did not deal with the masking properly. I would expect the masked region to be bounded by the separation line of land and sea, but it actually exceeds that line. I also tried with pcolor and this time the masking is handled correctly. Could anybody tell me what is the right way to use contourf for plotting masked arrays? Thanks! Zhaoru
Can anyone help me understand this: the code below produces a plot in which the x and y axis labels are reversed relative to the direction in which z varies on the plot, although the gradient arrows are correctly oriented. Is there something I've missed in understanding the sense of the x and y directions in mgrid, imshow, and gradient? """ x,y axes seem to be reversed """ import numpy as np from matplotlib.pylab import * dx = .25; dy = .25 xlen = 2.0; ylen = 2.0 x,y = np.mgrid[-xlen:xlen:dx, -ylen:ylen:dy] #also works with ogrid z = x hold(True) imshow(z, origin='lower', extent=[-xlen,xlen,-ylen,ylen]) colorbar() [u,v] = np.gradient(z) u /= dx; v /= dy QP = quiver(x,y,u,v,pivot='middle',color=[0.5,0.5,0.5]) quiverkey(QP, 0.85, 1.05, 1.0, '1 unit', labelpos='N') xlabel('x') ylabel('y') title('slope') show()
2011年2月20日 Curiouslearn <cur...@gm...>: > Thomas and Goyo, > > Thanks for the answers. I am fine with them being coverted to ints. In > fact, my ax.set_ylim(bottom=0, top=6000) contains ints and I don't > understand why they are converted to floats. I was thinking that there > is perhaps another (more correct) way to set tick values. You can use locators, but set_yticks is good enough for simple cases. http://matplotlib.sourceforge.net/api/ticker_api.html
'pick_event' fires when I pick on either the marker or the line segment of a Line2D object. But if I change the drawstyle to use steps (steps-pre, steps-post, steps-mid), picking on the line segment is broken. It still seems to think the line is linear. This leads to very strange behavior where picking on a line gives no feedback (e.g. a tooltip), but picking on a blank part of the graph does. Do I need to write my own custom picker function or is this an oversight in the code? Thanks, Jim
On Mon, Feb 21, 2011 at 1:32 PM, Waléria Antunes David < wal...@gm...> wrote: > Can you help me...please. > > On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David < > wal...@gm...> wrote: > >> I don't understand...i need that the yscale has these values: >> 1,10,100,1000 ....But i don't know how... >> >> Thanks, >> >> >> Let me make it clearer. Your green line has values on the order of 10^-17. There is nothing that can be done to meet your request if you are plotting data this small. Either this data is wrong, or you don't want to plot it at all. To exclude anything less than 1, use the following: ax.set_ylim(bottom=1) Note that this will exclude the green line in your plot! Ben Root
Can you help me...please. On Mon, Feb 21, 2011 at 4:02 PM, Waléria Antunes David < wal...@gm...> wrote: > I don't understand...i need that the yscale has these values: 1,10,100,1000 > ....But i don't know how... > > Thanks, > > > On Mon, Feb 21, 2011 at 3:58 PM, Benjamin Root <ben...@ou...> wrote: > >> >> >> On Mon, Feb 21, 2011 at 12:54 PM, Waléria Antunes David < >> wal...@gm...> wrote: >> >>> I did what you sai but the yscale was: 0, 0, 0, 0, 0, 0, 0, 1, 100 . >>> Would be the correct way: 1, 10, 100, 1000. >>> >>> See the wrong image attached. And the correct image - correct_graph >>> attached. >>> >>> Thanks, >>> >>> >> The graph isn't wrong. >> >> You are plotting really small values. If you don't want those values >> plotted, then don't plot them, or set the lower limits. >> >> Ben Root >> > >
Hello, I'm trying to use fill_between in the following script: [code] #!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl import pdb from jfb import readcsv #D = np.loadtxt('lat_sectors.csv',skiprows=1,delimiter=',') head,D = readcsv('lat_sectors.csv',head=1) D = np.array(D) data = D[:,1:] fig = plt.figure() ax = fig.add_subplot(211) plt.grid(True) data = np.cumsum(data,axis=1) m,n = D.shape norm = mpl.colors.normalize(0,n) for i in range(1,n-1): cmap = mpl.cm.gist_ncar(norm(i)) if i == 1: ax.fill_between(D[:,0],np.zeros(m),D[:,i],label='some.{0}'.format(i)) else: ax.fill_between(D[:,0],D[:,i-1],D[:,i],label=head[i],facecolor=cmap,edgecolor='none') #ax.fill(D[:,0],D[:,i],label='{0}'.format(i),facecolor=cmap) #ax.legend((ax.collections),([str(i) for i in range(len(ax.collections))])) plt.xlabel('Latitude, N') plt.ylabel('BC Emissions, Gg yr-1') plt.xlim([-50,80]) #plt.ylim([0,1]) plt.legend() plt.show() [/code] But when I run it I get the following error: /usr/lib/pymodules/python2.6/matplotlib/axes.py:4014: UserWarning: No labeled objects found. Use label='...' kwarg on individual plots. warnings.warn("No labeled objects found. " But, clearly, you can see I am using the label keyword. Is this a bug, or am I missing something? Thank you, john
I don't understand...i need that the yscale has these values: 1,10,100,1000 ....But i don't know how... Thanks, On Mon, Feb 21, 2011 at 3:58 PM, Benjamin Root <ben...@ou...> wrote: > > > On Mon, Feb 21, 2011 at 12:54 PM, Waléria Antunes David < > wal...@gm...> wrote: > >> I did what you sai but the yscale was: 0, 0, 0, 0, 0, 0, 0, 1, 100 . Would >> be the correct way: 1, 10, 100, 1000. >> >> See the wrong image attached. And the correct image - correct_graph >> attached. >> >> Thanks, >> >> > The graph isn't wrong. > > You are plotting really small values. If you don't want those values > plotted, then don't plot them, or set the lower limits. > > Ben Root >