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) |
From: Alejandro W. <ale...@gm...> - 2012-03-09 20:51:44
|
On Thu, Mar 8, 2012 at 12:45 PM, Jouni K. Seppänen <jk...@ik...> wrote: > Alejandro Weinstein <ale...@gm...> writes: > >> TypeError: unicode argument expected, got 'str' >> I am using MPL verion 1.2.x (built from commit 396a6446). > > That reminds me of a problem fixed in commit 680edf7, so could you > either try cherry-picking that commit or updating to a later revision? > Your test case doesn't produce an error on a recent-ish master. You're right. Just updated to the last version and the problem is gone. Thanks! Alejandro. |
From: Trillian <sin...@gm...> - 2012-03-09 20:10:41
|
Perfect! That is what I was looking for! Thanks a lot! Trillian Benjamin Root-2 wrote: > > On Thu, Mar 8, 2012 at 5:05 PM, Trillian <sin...@gm...> wrote: > >> >> Hello All, >> >> How do I control a width and length of a boxes in a stack plot? Currently >> with the code I have, I can only control the separation or the >> white-space >> between the two plots. I would like the top plot to be larger in length >> and >> narrow in width while the bottom plot to have the same width as the top >> but >> the length to be much shorter than the top. Please see figure. >> >> http://old.nabble.com/file/p33468632/RVs.png RVs.png >> >> >> #!/usr/bin/env python >> >> import asciitable >> data = asciitable.read('RVs.dat') >> # To use the variables in asciitable use col1, col2, etc.. >> >> from pylab import * >> >> f = figure() >> subplots_adjust(hspace=1) >> >> ax1 = subplot(211) >> ax1.plot(data.col6,data.col5, 'ko') >> ylabel('RV using GJ406') >> title('RV comparison') >> >> ax2 = subplot(212, sharex=ax1) >> ax2.plot(data.col6,data.col5-data.col6,'ko' ) >> xlabel('RV (km/s)') >> ylabel('Residuals (km/s)') >> # The line below takes away the x-axis values from top plot. >> xticklabels = ax1.get_xticklabels()+ax2.get_xticklabels() >> setp(xticklabels, visible=True) >> savefig('RVs.png') >> >> Thanks, >> >> Trillian >> >> > Perhaps GridSpec is what you need: > > http://matplotlib.sourceforge.net/users/gridspec.html > > Cheers! > Ben Root > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- View this message in context: http://old.nabble.com/Stack-Plot-tp33468632p33474293.html Sent from the matplotlib - users mailing list archive at Nabble.com. |
From: Jeffrey B. <jbl...@al...> - 2012-03-09 20:07:59
|
On Mar 9, 2012, at 1:05 PM, Jonathan Slavin wrote: > Hi all, > > I'm plotting a set of subplots (2 x 3) and I'd like to label the x > and y > axes with one title each (i.e. spanning the axes) since the units > of all > the x axes and y axes are the same. I know that I can use fig.text to > do it, though that would require some fiddling on my part to get the > placement right. Is there an easier way? > > Jon Hi Jon, The way I do this is to create a "master" axis that overlaps the others with dimensions equal to the outer border of all the other axes. Then I just use this axis for the labels: masterAxis.set_xlabel("ick") masterAxis.set_ylabel("blech") You also have to turn off ticks and tick labels for this axis: masterAxis.xaxis.set_major_formatter(mpl.ticker.NullFormatter()) masterAxis.yaxis.set_major_formatter(mpl.ticker.NullFormatter()) Since it doesn't know about tick labels, it may not position the axis labels far enough away from the axis line, so you can adjust the spacing: masterAxis.xaxis.labelpad += 6 masterAxis.yaxis.labelpad += 4 It's still a little fiddly, but less fiddly than using fig.text. I bet this could be significantly improved, e.g. with Axes_Grid, but I don't know how to do that. Cheers, Jeff |
From: Benjamin R. <ben...@ou...> - 2012-03-09 20:04:22
|
On Thu, Mar 8, 2012 at 5:05 PM, Trillian <sin...@gm...> wrote: > > Hello All, > > How do I control a width and length of a boxes in a stack plot? Currently > with the code I have, I can only control the separation or the white-space > between the two plots. I would like the top plot to be larger in length and > narrow in width while the bottom plot to have the same width as the top but > the length to be much shorter than the top. Please see figure. > > http://old.nabble.com/file/p33468632/RVs.png RVs.png > > > #!/usr/bin/env python > > import asciitable > data = asciitable.read('RVs.dat') > # To use the variables in asciitable use col1, col2, etc.. > > from pylab import * > > f = figure() > subplots_adjust(hspace=1) > > ax1 = subplot(211) > ax1.plot(data.col6,data.col5, 'ko') > ylabel('RV using GJ406') > title('RV comparison') > > ax2 = subplot(212, sharex=ax1) > ax2.plot(data.col6,data.col5-data.col6,'ko' ) > xlabel('RV (km/s)') > ylabel('Residuals (km/s)') > # The line below takes away the x-axis values from top plot. > xticklabels = ax1.get_xticklabels()+ax2.get_xticklabels() > setp(xticklabels, visible=True) > savefig('RVs.png') > > Thanks, > > Trillian > > Perhaps GridSpec is what you need: http://matplotlib.sourceforge.net/users/gridspec.html Cheers! Ben Root |
From: Wolfgang D. <wdr...@dr...> - 2012-03-09 19:15:22
|
On Fri, 9 Mar 2012 11:19:15 -0600 Benjamin Root <ben...@ou...> wrote: > Can I have the data you used to produce these errorbars so I can test > this bug? Here's the data # Fluence.... -sigma Signal... -sigma area 1127 48.32 9.114 10.31 0.1318 1.127e+04 482.9 35.96 16.15 0.4994 1.127e+05 4829 231.2 101.1 2.568 1.127e+06 4.829e+04 4631 1689 12.22 And here's the ploting tool source code (also used for generating the linked PDF). #!/usr/bin/env python2 # -*- coding: utf-8 -*- # vim: filetype python import sys, os, argparse import math, numpy, scipy, scipy.optimize import matplotlib, matplotlib.cm import matplotlib.pyplot as pyplot import pylab def expmodel(p, x): return p[0] + numpy.exp(p[1]*x)*p[2] def experror(p, x, y): return y - expmodel(p, x) def linmodel(p, x): return p[0] + p[1]*x def linerror(p, x, y): return y - linmodel(p, x) if __name__ == '__main__': optparse = argparse.ArgumentParser(description='plot raddark dat files with errorbars and linear or exponential model regression plots', prog=sys.argv[0]) optparse.add_argument('--xlabel', type=str, default='Particle Count') optparse.add_argument('--ylabel', type=str, default='Signal') optparse.add_argument('--title', type=str, default='') optparse.add_argument('--outlier', '-O', action='append', type=str) optfitgrp = optparse.add_mutually_exclusive_group() optfitgrp.add_argument('--exp', '-e', action='store_true') optfitgrp.add_argument('--lin', '-l', action='store_true') optparse.add_argument('--log', action='store_true') optparse.add_argument('files', type=str, nargs='+') options = optparse.parse_args(sys.argv[1:]) data = [ numpy.loadtxt(filename) for filename in options.files ] if options.outlier: outlier = [ numpy.loadtxt(filename) for filename in options.outlier ] ax = pyplot.subplot(1,1,1) if options.log: ax.loglog() ax.set_title(options.title) ax.set_xlabel(options.xlabel) ax.set_ylabel(options.ylabel) ax.grid(True, 'both') for f,d in zip(options.files, data): ax.errorbar(d[..., 0], d[..., 2], d[..., 3], d[..., 1], fmt='o', label=f) if options.outlier: for f,d in zip(options.outlier, outlier): ax.errorbar(d[..., 0], d[..., 2], d[..., 3], d[..., 1], fmt='+', label=f) if options.exp or options.lin: data_xs = numpy.concatenate( [ d[..., 0] for d in data ] ) data_ys = numpy.concatenate( [ d[..., 2] for d in data ] ) if options.outlier: x_max = numpy.nanmax( numpy.concatenate((data_xs, numpy.concatenate([ o[..., 0] for o in outlier ]))) ) x_min = numpy.nanmin( numpy.concatenate((data_xs, numpy.concatenate([ o[..., 0] for o in outlier ]))) ) else: x_max = numpy.nanmax(data_xs) x_min = numpy.nanmin(data_xs) x_ptp = x_max - x_min xs = numpy.arange(x_min - 0.05*x_ptp, x_max + 0.05*x_ptp, x_ptp/10000.) if options.exp: p = scipy.optimize.leastsq(experror, [numpy.nanmin(data_ys), 1e-6/x_ptp, 1./numpy.ptp(data_ys)], args=(data_xs, data_ys)) ys = expmodel(p[0], xs) if options.lin: p = scipy.optimize.leastsq(linerror, [numpy.nanmin(data_ys), 1./x_ptp, 1./numpy.ptp(data_ys)], args=(data_xs, data_ys)) ys = linmodel(p[0], xs) ax.plot(xs, ys, label="fit") ax.legend(loc='upper left') pyplot.show() |
From: Jonathan S. <js...@cf...> - 2012-03-09 18:05:24
|
Hi all, I'm plotting a set of subplots (2 x 3) and I'd like to label the x and y axes with one title each (i.e. spanning the axes) since the units of all the x axes and y axes are the same. I know that I can use fig.text to do it, though that would require some fiddling on my part to get the placement right. Is there an easier way? Jon -- ______________________________________________________________ Jonathan D. Slavin Harvard-Smithsonian CfA js...@cf... 60 Garden Street, MS 83 phone: (617) 496-7981 Cambridge, MA 02138-1516 cell: (781) 363-0035 USA ______________________________________________________________ |
From: Benjamin R. <ben...@ou...> - 2012-03-09 17:19:44
|
On Fri, Mar 9, 2012 at 3:29 AM, Wolfgang Draxinger < wdr...@dr...> wrote: > On Thu, 8 Mar 2012 19:47:05 -0600 > Benjamin Root <ben...@ou...> wrote: > > > Which version of matplotlib are you using? Also, are you setting the > > log scale before (preferred) or after (won't work) the call to hist()? > > Version is matplotlib-1.1.0, installed through standard Gentoo ebuild. > And the scale parameters are set before all the drawing calls. > > > Wolfgang > > Wolfgang, Can I have the data you used to produce these errorbars so I can test this bug? Ben Root |
From: Benjamin R. <ben...@ou...> - 2012-03-09 16:54:27
|
On Thu, Mar 8, 2012 at 4:02 PM, Sourabh Bajaj <sou...@gm...>wrote: > I am creating a PyQT based tool. that has a Figure canvas embedded in it. > > I want to update the plot on some event. I can draw the plot perfectly. > But how do I clear the plot without removing the mouse movement > capabilities. > > axes.cla, fixes the axis movement as well. > > > Just took a look at the cla() method in mplot3d and it seems that the original author of the module put in a call to disable all user interaction when ax.cla() is called. I find this to be very odd and undesirable. I suspect that it was needed when the module was originally done, but I don't think that is the case anymore. Unless someone can tell me the reason for disabling mouse interaction for mplot3d axes, I will submit a bug fix. Ben Root |
From: Dharhas P. <Dha...@tw...> - 2012-03-09 16:01:16
|
As someone who has never contributed to matplotlib before, are there any instructions on how to contribute to writing tests. We have some data and scripts we could probably convert to tests for the nxutils points in poly functions. Should I just do i pull the branch nxutilsbackwards branch and make a pull request after adding tests on github? - dharhas >>> Michael Droettboom <md...@st...> 3/8/2012 5:51 PM >>> There is a proposed solution to all of this here: https://github.com/matplotlib/matplotlib/pull/746 Please test -- I don't have any nxutils-using code myself, and matplotlib itself has none. We should probably convert some of the nxutils code in the wild into some unit tests. Mike On 03/08/2012 12:37 PM, Benjamin Root wrote: On Thu, Mar 8, 2012 at 11:16 AM, Benjamin Root <ben...@ou...> wrote: On Thu, Mar 8, 2012 at 10:47 AM, John Hunter <jd...@gm...> wrote: On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root <ben...@ou...> wrote: +1 as well. I just took another look at the Path object and I see no such function. The lack of this function is a problem for me as well in my existing apps. In order to deprecate nxutils, this functionality needs to be added to Path. Otherwise, nxutils *must* be reinstated before the next release. Michael has already agreed to make a nxutils compatibility layer that would have the same interface as the old nxutils. So we are talking about performance, not core functionality. We should remember that Michael did the lion's share of the work on porting mpl to python 3 (https://github.com/matplotlib/matplotlib/pull/565/commits). He elected not to port all of the C++ if he could replace some of the functionality with the core. So those who rely on bare metal speed the you are getting in nxutils should step up to either : 1) help with the port of nxutils to python 3 2) help with exposing methods in _path.cpp that are almost as fast or faster 3) live with slower speeds in the compatibility layer he has agreed to write 4) ask (nicely) for someone to help you I prefer option 2 because this is fairly easy and avoids code redundancy. It would take just a few lines of extra code to do this with the python sequence protocol as inputs and python lists as return values. It would take a bit more to support numpy arrays as input and output, and we should get input from Michael about the desirability of making _path.cpp depend on numpy. I don't see the harm, but I'd like to verify. In my opinion, a slower implementation in a nxutils.py compatibility module is not a release stopper, even if it is undesirable. JDH Don't get me wrong. If help is needed, I can certainly provide it since it is my itch. I am just a little exasperated with how this issue has been handled up to now. The shim is a very good idea and it should have been done back when the py3k merge happened. I didn't press the issue then because I was traveling and didn't have time to examine the issue closely, and having _nxutils.so still in my build hide the problem from me (my own fault). As for shim implementation, I would be willing to accept a slightly slower function now (with the promise of improvements later), but if the implementation is too much slower, then effort will need to be made to get it up to acceptable levels. I know of several users **cough**my future employer**cough** who uses functionality such as this, and they would not be happy if their products are dragged down by such a bottleneck. Probably about time I dug more into CXX wrapped stuff... Ben Root Looking over the code, it looks like we could generalize point_in_path_impl() into points_in_path_impl(). The current code iterates through the path vertices to test a single point. Putting this action inside a loop (for each point that we want to test) would mean that this iterator has to be processed each time, which I suspect would kill performance when the number of vertices is far greater than the number of test points. Tinkering.... Ben Root ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |
From: Wolfgang D. <wdr...@dr...> - 2012-03-09 09:23:33
|
On Thu, 8 Mar 2012 19:47:05 -0600 Benjamin Root <ben...@ou...> wrote: > Which version of matplotlib are you using? Also, are you setting the > log scale before (preferred) or after (won't work) the call to hist()? Version is matplotlib-1.1.0, installed through standard Gentoo ebuild. And the scale parameters are set before all the drawing calls. Wolfgang |
From: Benjamin R. <ben...@ou...> - 2012-03-09 06:27:10
|
On Wednesday, March 7, 2012, questions anon <que...@gm...> wrote: > Hi all, > I am still having a problem with the same code. I am not sure if maybe the problem is how I read the data in as numpy.genfromtxt > Is there a step I need to take to convert the data to numpy array to then read into matplotlib? Sorry for the delay. As far as I can tell, you are doing everything correctly. The error you are getting would seem to indicate something wrong with your EPD install, or perhaps a conflict with another install on numpy or mpl. I would suggest completely clearing out your python and EPD install and reinstalling it fresh. Ben Root |
From: Patrick M. <pat...@gm...> - 2012-03-09 06:13:00
|
Greetings, Let me begin by saying that I've fallen in love with ImageGrid. I love the control it gives me in setting up plots, and I really like the control it offers for setting up a colorbar. Unfortunately, like all relationships, ImageGrid and I have hit a rough patch. I like to manually place titles and other boxes of texts on plots that I make using ImageGrid. However, to center things I have to know what the axes bounds are so I can do the centering calculations. Unfortunately, when using ImageGrid, or axes_divider, I have yet to find a way to get the axes bounds that are actually used to do the plotting. When I try to use ax.get_position().bounds I get the pre-adjusted bounds, even if I use plt.draw() before requesting the axes_positions. This means the only way I can center the text is by guessing what the final axes bounds will be. Is there any way of getting the final bounds? It appears anchored text is able to do it, but I haven't been able to... Here's a self-contained example script that demonstrates the problem. I don't use ImageGrid, instead using axes_divider, however this is the same problem that AxesGrid has. (I'm guessing this is because ImageGrid ultimately does what I did here behind the scenes.) https://gist.github.com/2004869 Thanks for any help! Patrick --- Patrick Marsh Ph.D. Student / Liaison to the HWT School of Meteorology / University of Oklahoma Cooperative Institute for Mesoscale Meteorological Studies National Severe Storms Laboratory http://www.patricktmarsh.com |
From: Paul H. <pmh...@gm...> - 2012-03-09 02:30:14
|
In my GIS experience, rasters don't have prj files. That's something that seems to be pretty specific to ESRI shapefiles. Point is, I don't think that's going to help you. All of the basemap examples use netcdf files. I think your path of least resistance right now is to figure out how to convert your text file to a numpy array (check?), and then that array to a netcdf that is structured such that you can follow the basemap examples: http://matplotlib.github.com/basemap/users/examples.html Hope that helps, -paul On Wed, Mar 7, 2012 at 8:21 PM, questions anon <que...@gm...> wrote: > Hi all, > I am still having a problem with the same code. I am not sure if maybe the > problem is how I read the data in as numpy.genfromtxt > Is there a step I need to take to convert the data to numpy array to then > read into matplotlib? > Thanks > > > On Fri, Mar 2, 2012 at 11:49 AM, questions anon <que...@gm...> > wrote: >> >> python, numpy through enthought - >> Python 2.7.2 |EPD 7.1-1 (32-bit)| (default, Jul 3 2011, 15:13:59) [MSC >> v.1500 32 bit (Intel)] on win32 >> imports at the top of the script: >> >> import numpy as N >> import matplotlib.pyplot as plt >> from numpy import ma as MA >> from mpl_toolkits.basemap import Basemap >> import os >> >> >> >> On Thu, Mar 1, 2012 at 4:42 PM, Benjamin Root <ben...@ou...> wrote: >>> >>> >>> >>> On Wednesday, February 29, 2012, questions anon wrote: >>>> >>>> I have had some progress reading in the data but am unsure how to create >>>> lats and lons from the info I have (see above). >>>> the error I am receiving is: >>>> >>>> Traceback (most recent call last): >>>> File "d:\plotrainfall.py", line 40, in <module> >>>> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet) >>>> File "C:\Python27\lib\site-packages\mpl_toolkits\basemap\__init__.py", >>>> line 3072, in contourf >>>> >>>> np.logical_or(outsidemask,np.logical_or(ma.getmaskarray(data),xymask)) >>>> AttributeError: logical_or >>>> >>>> >>>> from the below code: >>>> >>>> >>>> onefile=r"E:/test_in/r19000117.txt" >>>> >>>> f=N.genfromtxt(onefile, skip_header=6, dtype=float, names=True) >>>> print f >>>> >>>> >>>> map = Basemap(projection='merc',llcrnrlat=-45,urcrnrlat=-9, >>>> >>>> llcrnrlon=111.975,urcrnrlon=156.525,lat_ts=0,resolution='i') >>>> map.drawcoastlines() >>>> map.drawstates() >>>> xi=N.linspace(111.975, 156.275, 886) >>>> yi=N.linspace(-44.525, -9.975, 691) >>>> x,y=map(*N.meshgrid(xi,yi)) >>>> plt.title('rainfall') >>>> CS = map.contourf(x,y, f, 15,cmap=plt.cm.jet) >>>> l,b,w,h =0.1,0.1,0.8,0.8 >>>> cax = plt.axes([l+w+0.025, b, 0.025, h]) >>>> plt.colorbar(CS,cax=cax, drawedges=True) >>>> plt.savefig((os.path.join(OutputFolder, 'rainfall.png'))) >>>> plt.show() >>>> plt.close() >>>> >>>> >>> >>> How did you install numpy? Which version are you using? What are your >>> imports at the top of this script? >>> >>> Ben Root >> >> > > > ------------------------------------------------------------------------------ > Virtualization & Cloud Management Using Capacity Planning > Cloud computing makes use of virtualization - but cloud computing > also focuses on allowing computing to be delivered as a service. > http://www.accelacomm.com/jaw/sfnl/114/51521223/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > |
From: Benjamin R. <ben...@ou...> - 2012-03-09 01:51:32
|
On Thursday, March 8, 2012, Wolfgang Draxinger < wdr...@dr...> wrote: > Hi, > > I've got a datasets of a pixel particle detector for a number of > independent events. I'd like to show them in a row but have them all > use the same value and thus color range. What's the most straigtforward > way to do this? > > > Cheers, > > Wolfgang Draxinger Quick and dirty way is to set vmin and vmax for each of them using common values. You could also pass in a "norm" argument that does something similar. Ben Root |
From: Benjamin R. <ben...@ou...> - 2012-03-09 01:48:08
|
On Thursday, March 8, 2012, Benjamin Root <ben...@ou...> wrote: > > > On Thursday, March 8, 2012, Wolfgang Draxinger < wdr...@dr...> wrote: >> Hi, >> >> I've a problem with some errorbars not drawn correctly in (double) >> logarithmic plots. See this PDF for an example: >> >> http://dl.wolfgang-draxinger.net/C6_77MeV_raddamage.pdf >> >> The vertical errorbar for the datapoint at x=1e3 are not drawn. Similar >> also happens for some horizontal errorbars. Using the very same drawing >> commands, except switching to a logarithmic scaling the errorbars draw >> just fine. >> >> So what's going on there? >> >> >> Wolfgang Draxinger > > Which version of matplotlib are you using? Also, are you setting the log scale before (preferred) or after (won't work) the call to hist()? > > Ben Root Grrr, not hist(), but errorbar(). Ben Root |
From: Benjamin R. <ben...@ou...> - 2012-03-09 01:47:13
|
On Thursday, March 8, 2012, Wolfgang Draxinger < wdr...@dr...> wrote: > Hi, > > I've a problem with some errorbars not drawn correctly in (double) > logarithmic plots. See this PDF for an example: > > http://dl.wolfgang-draxinger.net/C6_77MeV_raddamage.pdf > > The vertical errorbar for the datapoint at x=1e3 are not drawn. Similar > also happens for some horizontal errorbars. Using the very same drawing > commands, except switching to a logarithmic scaling the errorbars draw > just fine. > > So what's going on there? > > > Wolfgang Draxinger Which version of matplotlib are you using? Also, are you setting the log scale before (preferred) or after (won't work) the call to hist()? Ben Root |
From: Wolfgang D. <wdr...@dr...> - 2012-03-09 01:21:38
|
Hi, I've a problem with some errorbars not drawn correctly in (double) logarithmic plots. See this PDF for an example: http://dl.wolfgang-draxinger.net/C6_77MeV_raddamage.pdf The vertical errorbar for the datapoint at x=1e3 are not drawn. Similar also happens for some horizontal errorbars. Using the very same drawing commands, except switching to a logarithmic scaling the errorbars draw just fine. So what's going on there? Wolfgang Draxinger |
From: Wolfgang D. <wdr...@dr...> - 2012-03-09 01:21:37
|
Hi, I've got a datasets of a pixel particle detector for a number of independent events. I'd like to show them in a row but have them all use the same value and thus color range. What's the most straigtforward way to do this? Cheers, Wolfgang Draxinger |