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
(27) |
2
(15) |
3
(2) |
4
(4) |
5
(5) |
6
(9) |
7
(15) |
8
(24) |
9
(19) |
10
(7) |
11
(13) |
12
(26) |
13
(27) |
14
(17) |
15
(14) |
16
(12) |
17
(9) |
18
(12) |
19
(17) |
20
(19) |
21
(5) |
22
(5) |
23
(7) |
24
(4) |
25
(1) |
26
(9) |
27
(20) |
28
(5) |
29
(10) |
30
(12) |
31
(6) |
El día 21 de marzo de 2012 01:03, questions anon > f=np.genfromtxt(inputfile, skip_header=6, dtype=None, names=True) I don't think you should be using dtype=None if you wand a 2D array. Also the names=True thing makes no sense to me since there isn't a row with field names. Try just this and I guess you'll get a 2D array: f=np.genfromtxt(inputfile, skip_header=6) Goyo
I liked the plot very much, too. I want to start using python and matplotlib for my everyday engineering calculations and could use any handy matplotlib samples. This in particular looks great, compare to the copied-and-copied-and-copied-over black-and-white scanned-in plot in the design manual...no, I am not quite a fluid dynamics kind of guy, but sometimes I need to do such job, anyway. So, good job and thanks for contributing. -- View this message in context: http://old.nabble.com/sample-to-contribute-to-mpl-gallery-tp33541388p33544585.html Sent from the matplotlib - users mailing list archive at Nabble.com.
On 2012年3月12日 15:51:15 -0500 Benjamin Root <ben...@ou...> wrote: > Ah, finally figured it out. The issue is that your y-value for that > error bar is 9.114, but you want to plot error bars that are > +/-10.31. That line gets thrown out by matplotlib because you can't > plot at negative values for log scale. Yes, I came to the same conclusion. I think matplotlib should print some warning or raise some exception if confronted with data like that, it can't handle. > There is a trick that might > work. The set_yscale method has a kwarg "nonposy" which could be set > to "clip". You could also try setting to the "symlog" scale which > might let you get away with a negative value. I'll try that. Thanks Wolfgang
On Tue, Mar 20, 2012 at 4:10 PM, Daniel Hyams <dh...@gm...> wrote: > There was a request a while back to create plots that are more > application-oriented for the matplotlib gallery, so I'd like to submit this > one for inclusion. I tried to spruce it up a bit to show what MPL can do, > and I'm sure that the folks here can improve upon it. But at any rate, > this is a good first iteration I think. > > I'm also going to try to replace the plot at wikipedia (for the Moody > diagram) with this one. The one at wikipedia is not quite correct in the > way friction factors are computed, and a nice side effect is that mpl gets > some exposure there as well (although there are probably dozens of mpl > plots already there, but I don't know how to find them). > > The below is meant as constructive criticism; I certainly am committed to > using matplotlib and offering patches here and there as I can; I would love > to see wider adoption of it. I also concede that in the below items, I > might have missed something obvious. I'm trying to approach this as a user > who was just introduced to matplotlib, and had to create the plot that is > attached. > > 1) The table mechanism, while very nice and useful, could use some > improvement; it should be easier to specify alignment for the table cells, > and individual fonts for each cell. > 2) drawing the arrows was much harder than it needs to be. Better > defaults for arrowhead sizes would help a lot (instead of them being > hardcoded to certain numbers, have the defaults be fungible based on how > long the arrow is in pixel space), and I had to resort to using the > annotate() function to draw them, after spending over an hour trying to use > plt.arrow(). plt.arrow() had some problems drawing arrowheads on log-log > plots, and well as not supporting a double-ended arrow. > 3) drawing the shading using polygons was great and easy. > 4) the title by default is placed too close to the top > 5) the plot axis labels were clipped by default; had to pull the axis > limits in (I know, this is a longstanding thing, but a new user would > wrinkle their nose) > > All in all, the plot took a lot longer to make than I had anticipated; > mainly due to some fussing with the issues above until I found something > that worked. > > Hope that you find the sample useful. > > -- > Daniel Hyams > dh...@gm... > I'm not one of the mpl-developers, so I can't speak about the likelihood of inclusion, but I do think it's a great plot (esp. since my background is in fluid mechanics). I think it'd be a great example to have, especially if the gallery gets split up into different categories<https://github.com/matplotlib/matplotlib/pull/714>. (Personally, I think it would be nice to have a category for complex, application-style examples, and multiple categories for simplified-versions of most of the current examples). I agree with most of your points, but I don't have much to add on anything except for #2: Drawing arrows has been painful for me as well. If I find the time, I plan on putting together a PR which draws arrows using a FancyArrowPatch and a Line2D object. Although, `annotate` works great for it's designed purpose, it can be cumbersome for drawing simple arrows. -Tony
thanks for all of your responses. I agree with Benjamin that I have two issues, and firstly I need to figure out importing the text to a 2d array before plotting. I can take this question elsewhere but will run it by you first: My problem seems to be that when I use np.genfromtxt it imports my 2d array as a 1d array. I have tried using np.reshape import numpy as np inputfile=r"d:/BoMdata/r19000117.txt" outputfolder=r"d:/BoMdata/outputfolder" f=np.genfromtxt(inputfile, skip_header=6, dtype=None, names=True) print "f is: ", f[1:2] print "f shape: ", f.shape print "f dtype: ", f.dtype print "f size: ", f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.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 9.49085e-05, 0.00056383, 0.00132367, 0.00417144, 0.00618987, 0.00776004, 0.0094961, 0.011557, 0.0139465, 0.0166607, 0.019674, 0.0229193, 0.0262693, 0.0295119, 0.0323237, 0.0342322, 0.0341227, 0.0288054, 0.0163089, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.00245558, 0.0309294, 0.0521848, 0.0663444, 0.0706948, 0.0681689, 0.0633213, 0.0575578, 0.0514137, 0.0452683, 0.0393741, 0.0338871, 0.0288934, 0.0244262, 0.0204939, 0.0170896, 0.014127, 0.0115916, 0.00944895, 0.00765294, 0.00615862, 0.00486124, 0.00325027, 0.000950427, 9.23129e-05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0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0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0)] f shape: (690,) f dtype: [('0', '<i4'), ('0_1', '<i4'), ('0_2', '<i4'), ('0_3', '<i4'), ('0_4', '<i4'), ('0_5', '<i4'), ('0_6', '<i4'), ('0_7', '<i4'), ('0_8', '<f8'), ('0_9', '<f8'), ('0_10', '<f8'), ('0_11', '<f8'), ('0_12', '<f8'), ('0_13', '<f8'), ('0_14', '<f8'), ('0_15', '<f8'), ('0_16', '<f8'), ('0_17', '<f8'), ('0_18', '<f8'), ('0_19', '<f8'), ('0_20', '<f8'), ('0_21', '<f8'), ('0_22', '<f8'), ('0_23', '<f8'), ('0_24', '<f8'), ('0_25', '<f8'), ('0_26', '<f8'), ('0_27', '<f8'), ('0_28', '<f8'), ('0_29', '<f8'), ('0_30', '<f8'), ('0_31', '<f8'), ('0_32', '<f8'), ('0_33', '<f8'), ('0_34', '<f8'), ('0_35', '<f8'), ('0_36', '<f8'), ('0_37', '<f8'), ('0_38', '<f8'), ('0_39', '<f8'), ('0_40', '<f8'), ('0_41', '<f8'), ('0_42', '<f8'), ('0_43', '<f8'), ('0_44', '<f8'), ('0_45', '<f8'), ('0_46', '<f8'), ('0_47', '<f8'), ('0_48', '<f8'), ('0_49', '<f8'), ('0_50', '<f8'), ('0_51', '<f8'), ('0_52', '<f8'), ('0_53', '<f8'), ('0_54', '<f8'), ('0_55', '<f8'), ('0_56', '<f8'), ('0_57', '<f8'), ('0_58', '<f8'), ('0_59', '<f8'), ('0_60', '<f8'), ('0_61', '<f8'), ('0_62', '<f8'), ('0_63', '<f8'), ('0_64', '<f8'), ('0_65', '<f8'), ('0_66', '<f8'), ('0_67', '<f8'), ('0_68', '<f8'), ('0_69', '<f8'), ('0_70', '<f8'), ('0_71', '<f8'), ('0_72', '<f8'), ('0_73', '<f8'), ('0_74', '<f8'), ('0_75', '<f8'), ('0_76', '<f8'), ('0_77', '<f8'), ('0_78', '<f8'), ('0_79', '<f8'), ('0_80', '<f8'), ('0_81', '<f8'), ('0_82', '<f8'), ('0_83', '<f8'), ('0_84', '<f8'), ('0_85', '<f8'), ('0_86', '<f8'), ('0_87', '<f8'), ('0_88', '<f8'), ('0_89', '<f8'), ('0_90', '<f8'), ('0_91', '<f8'), ('0_92', '<f8'), ('0_93', '<f8'), ('0_94', '<f8'), ('0_95', '<f8'), ('0_96', '<f8'), ('0_97', '<f8'), ('0_98', '<f8'), ('0_99', '<f8'), ('0_100', '<f8'), ('0_101', '<f8'), ('0_102', '<f8'), ('0_103', '<f8'), ('0_104', '<f8'), ('0_105', '<f8'), ('0_106', '<f8'), ('0_107', '<f8'), ('0_108', '<f8'), ('0_109', '<f8'), ('0_110', '<f8'), ('0_111', '<f8'), ('0_112', '<f8'), ('0_113', '<f8'), ('0_114', '<f8'), ('0_115', '<f8'), ('0_116', '<f8'), ('0_117', '<f8'), ('0_118', '<f8'), ('0_119', '<f8'), ('0_120', '<f8'), ('0_121', '<f8'), ('0_122', '<f8'), ('0_123', '<f8'), ('0_124', '<f8'), ('0_125', '<f8'), ('0_126', '<f8'), ('0_127', '<f8'), ('0_128', '<f8'), ('0_129', '<f8'), ('0_130', '<f8'), ('0_131', '<f8'), ('0_132', '<f8'), ('0_133', '<f8'), ('0_134', '<f8'), ('0_135', '<f8'), ('0_136', '<f8'), ('0_137', '<f8'), ('0_138', '<f8'), ('0_139', '<f8'), ('0_140', '<f8'), ('0_141', '<f8'), ('0_142', '<f8'), ('0_143', '<f8'), ('0_144', '<f8'), ('0_145', '<f8'), ('0_146', '<f8'), ('0_147', '<f8'), ('0_148', '<f8'), ('0_149', '<f8'), ('0_150', '<f8'), ('0_151', '<f8'), ('0_152', '<f8'), ('0_153', '<f8'), ('0_154', '<f8'), ('0_155', '<f8'), ('0_156', '<f8'), ('0_157', '<f8'), ('0_158', '<f8'), ('0_159', '<f8'), ('0_160', '<f8'), ('0_161', '<f8'), ('0_162', '<f8'), ('0_163', '<f8'), ('0_164', '<f8'), ('0_165', '<f8'), ('0_166', '<f8'), ('0_167', '<f8'), ('0_168', '<f8'), ('0_169', '<f8'), ('0_170', '<f8'), ('0_171', '<f8'), ('0_172', '<f8'), ('0_173', '<f8'), ('0_174', '<f8'), ('0_175', '<f8'), ('0_176', '<f8'), ('0_177', '<f8'), ('0_178', '<f8'), ('0_179', '<f8'), ('0_180', '<f8'), ('0_181', '<f8'), ('0_182', '<f8'), ('0_183', '<f8'), ('0_184', '<i4'), ('0_185', '<i4'), ('0_186', '<i4'), ('0_187', '<i4'), ('0_188', '<i4'), ('0_189', '<i4'), ('0_190', '<i4'), ('0_191', '<i4'), ('0_192', '<i4'), ('0_193', '<i4'), ('0_194', '<i4'), ('0_195', '<i4'), ('0_196', '<i4'), ('0_197', '<i4'), ('0_198', '<i4'), ('0_199', '<i4'), ('0_200', '<i4')] Traceback (most recent call last): File "d:/BoMdata/plotrainfall_v3.py", line 10, in <module> print "f dtype: ", f.dtype[1:2] ValueError: Field key must be an integer, string, or unicode. On Wed, Mar 21, 2012 at 1:47 AM, Benjamin Root <ben...@ou...> wrote: > > > On Mon, Mar 19, 2012 at 5:28 PM, questions anon <que...@gm...>wrote: > >> So when I add "np.logical_or" to the beginning of the script it makes no >> difference to the error message that I receive. >> >> I have tried reshaping the array but I receive an error message of: >> Traceback (most recent call last): >> File "<pyshell#0>", line 1, in <module> >> f.reshape(691,886) >> ValueError: total size of new array must be unchanged >> >> Is there a way to use np.genfromtxt and define the rows and columns on >> import? >> >> Thanks >> >> > I think you have two completely separate problems. They are completely > unrelated to each other. The np.logical_or() issue happens within Basemap > while your np.genfromtext() happens in your module. For the > np.logical_or() issue, I suspect that there is something wrong with your > installation (maybe EPD is conflicting with a pre-existing python > install?). As for np.genfromtext(), I would put the code back to the way > it was before (the original call looked right to me). > > Ben Root > >