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
(16) |
3
(9) |
4
(12) |
5
(14) |
6
(22) |
7
(17) |
8
(33) |
9
(26) |
10
(32) |
11
(47) |
12
(26) |
13
(7) |
14
(24) |
15
(44) |
16
(42) |
17
(22) |
18
(31) |
19
(8) |
20
(4) |
21
(15) |
22
(27) |
23
(41) |
24
(33) |
25
(31) |
26
(24) |
27
(10) |
28
(20) |
|
|
|
|
|
|
Hi! I'm trying to loop through all the built-in colormaps, applying each to an image before printing it to a file, then moving on to the next one. >>> from matplotlib import cm >>> for cmap in dir(cm): # cmap in cm doesn't work 'cause cm is a module >>> ax.imshow(image, cmap) >>> canvas.print_figure('image_'+cmap) works until cmap == 'LUTSIZE', which evaluates to an integer and thus raises an exception. I tried putting it in a try/except: >>> for cmap in dir(cm): >>> try: >>> ax.imshow(image, cmap) >>> canvas.print_figure('image_'+cmap) >>> except: >>> pass but despite this, after 'LUTSIZE', every cmap - even valid ones - also raises the exception, and thus doesn't get used. So I tried just by-passing cmap == 'LUTSIZE' (in the obvious way), but then encountered cmap == 'ScalarMapable', which resulted in the same subsequent behavior as 'LUTSIZE'. At that point I decided I should try a "positive filter," so I figured out that cmaps are instances of matplotlib.colors.LinearSegmentedColormap (which I imported as LSC) and tried adding an "if isinstance(cmap, LSC)", but of course that didn't work, 'cause the elements of dir(cm) are strings, not LSC's. At this point I've decided I've wasted too much time trying to figure this out on my own, so: 0) is there some "elegant" way to do what I want to do? 1) why doesn't this: >>> for cmap in dir(cm): >>> try: >>> ax.imshow(image, cmap) >>> canvas.print_figure('image_'+cmap) >>> except: >>> pass "work" (i.e., simply bypass those elements of dir(cm) which cause imshow to raise an exception, but then continue on as if nothing had happened)? Is this a bug? Thanks! DG
On Tue, Feb 23, 2010 at 5:04 PM, Ariel Rokem <ar...@be...> wrote: > Hi - > > yes - but I want something that looks like the generic boxplot, but in > which I can control where the edges of the boxes are placed what the sizes > of the whiskers are. A combination of errorbar and bar, with this > appearance, if you will. > > Cheers - Ariel > > I guess then yours will be a non-standard box-plot because in a regular boxplot median is at 50th percentile, and the edges are at 25 and 75th respectively. There is no consensus for whiskers some uses 5 and 95 some 10 - 90 or you could come up with your own pair. Don't get surprised if you see different results for different percentiles. See at http://old.nabble.com/incorrect-boxplot--td25440025.html Probably you don't seek something like boxplot's widths kw arg if I understand you right? > > On Tue, Feb 23, 2010 at 2:49 PM, Gökhan Sever <gok...@gm...>wrote: > >> >> >> On Tue, Feb 23, 2010 at 3:02 PM, Ariel Rokem <ar...@be...> wrote: >> >>> Hi - more generally, is there any way to control the location of the >>> median line, the vertical size of the box and the vertical location of the >>> whiskers? >>> >>> Thanks - Ariel >>> >>> >> Aren't those generically calculated from the data? >> >> >> -- >> Gökhan >> > > > > -- > Ariel Rokem > Helen Wills Neuroscience Institute > University of California, Berkeley > http://argentum.ucbso.berkeley.edu/ariel > -- Gökhan
Hi - yes - but I want something that looks like the generic boxplot, but in which I can control where the edges of the boxes are placed what the sizes of the whiskers are. A combination of errorbar and bar, with this appearance, if you will. Cheers - Ariel On Tue, Feb 23, 2010 at 2:49 PM, Gökhan Sever <gok...@gm...> wrote: > > > On Tue, Feb 23, 2010 at 3:02 PM, Ariel Rokem <ar...@be...> wrote: > >> Hi - more generally, is there any way to control the location of the >> median line, the vertical size of the box and the vertical location of the >> whiskers? >> >> Thanks - Ariel >> >> > Aren't those generically calculated from the data? > > > -- > Gökhan > -- Ariel Rokem Helen Wills Neuroscience Institute University of California, Berkeley http://argentum.ucbso.berkeley.edu/ariel
It is best to create a figure of a right size in the first place. If this cannot be done, try something like below. dpi = 80 fig=figure(1, dpi=dpi) ax = axes((0,0,1,1)) ax.set_aspect(1) from matplotlib.transforms import TransformedBbox, Affine2D w, h = fig.get_size_inches() bbox = TransformedBbox(ax.bbox, fig.transFigure.inverted()+Affine2D().scale(w, h)) savefig("a.png", bbox_inches=bbox, dpi=dpi) Note that the size of the output will be different from the original figure size. Regards, -JJ On Tue, Feb 23, 2010 at 3:37 PM, Bruce Ford <br...@cl...> wrote: > I'm attempting to output an image with a predictable bounding box so > that it can be placed into a KML document and be correctly > georeferenced. > > Essentially I need a PNG that has NO labeling and the size of the > image be exactly the size of the plot bounding box and no more, no > less. > > I can get exactly what I want with the top and bottom of the image with: > > fig.add_axes((0,0,1,1) > > However, I'm still left with undesired space on the left and right. > How can I bring the left and right edges of the bounding box to match > the image width? > > Also, this might be a candidate for a handy function for > pyplot.figure(). This could be very useful for anyone needing to make > KML-friendly figures. > > Thanks for any ideas! > > Bruce > --------------------------------------- > Bruce W. Ford > Clear Science, Inc. > br...@cl... > http://www.ClearScienceInc.com > Phone/Fax: 904-379-9704 > 8241 Parkridge Circle N. > Jacksonville, FL 32211 > Skype: bruce.w.ford > Google Talk: fo...@gm... > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On Tue, Feb 23, 2010 at 3:02 PM, Ariel Rokem <ar...@be...> wrote: > Hi - more generally, is there any way to control the location of the median > line, the vertical size of the box and the vertical location of the > whiskers? > > Thanks - Ariel > > Aren't those generically calculated from the data? -- Gökhan
This seems to be a bug and I recommend you to file a bug. This happens because Axis.set_ticklabels method only changes the attributes of left (or bottom) tick labels. Meanwhile, try for t in colorbar.ax.get_yticklabels(): t.set_color("w") -JJ On Tue, Feb 23, 2010 at 11:03 AM, Jim Vickroy <Jim...@no...> wrote: > Hello, > > I'm (unsuccessfully) trying to generate a figure (with a labeled colorbar) > having a black background. > > Here is the code. > > _purpose_ = 'demonstrate capability to create PNG with black background > including labeled color bar' > _author_ = 'jim...@no...' > > import numpy # http://numpy.scipy.org/ > import matplotlib # http://matplotlib.sourceforge.net/index.html > matplotlib.use('Agg') # http://matplotlib.sourceforge.net/backends.html -- > probably the fastest, non-GUI, rendering backend > import matplotlib.pyplot as plot # > http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot > import matplotlib.cm # color maps > > import sys > assert sys.version == '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) > [MSC v.1500 32 bit (Intel)]', sys.version > assert numpy.__version__ == '1.4.0', numpy.__version__ > assert matplotlib.__version__ == '0.99.1', matplotlib.__version__ > > data_min = 0 > data_max = 256 > data = numpy.random.randint(data_max, size=(512,512)) > rows_cnt, columns_cnt = data.shape > shape = rows_cnt, columns_cnt > x = numpy.empty(data.shape, dtype=int) > y = numpy.empty(data.shape, dtype=int) > x[:] = numpy.arange(rows_cnt) > y[:] = numpy.arange(columns_cnt) > XI, YI = numpy.meshgrid(x[0], y[0]) > > title = 'this is the figure title' > plot.clf() # clear the figure > plot.title(title,color='white',backgroundcolor='black') > plot.axis('off') > colormap = 'gist_heat' > config = dict(cmap=eval('matplotlib.cm.%s' % colormap), vmin=data_min, > vmax=data_max) # vmin,vmax specify a fixed (color-map) scale > plot.pcolormesh(XI, YI, data, **config) > colorbar = plot.colorbar() > ############################################################################################################################################################## > # labels = ??? list of strings labels ??? > labels = [str(i) for i in range(10)] > colorbar.ax.set_yticklabels(labels, color='white') > ############################################################################################################################################################## > plot.imshow(data, interpolation='bilinear', cmap=config['cmap'], > origin='upper', extent=[0,rows_cnt,0,columns_cnt]) > # plot.show() # interactive > filename = 'trial-plot-with-labeled-colorbar.png' > plot.savefig(filename, facecolor='black') > plot.close() > > which generates a figure with a black background and invisible (black) color > bar labels. > > I'm probably going about this completely wrong. > > Questions: > > How do I get white color bar labels? > How do I access the generated sequence of string labels (for use as the > first set_yticklabels parameter) rather than artificially defining a list of > labels? > > Thanks, > -- jv > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
See http://www.mail-archive.com/mat...@li.../msg13203.html http://www.mail-archive.com/mat...@li.../msg13204.html -JJ On Tue, Feb 23, 2010 at 9:22 AM, Sebastian Rhode <seb...@go...> wrote: > Hi, > > has anyone a good idea how to interactively display the xy coordintes (as > whole numbers) and the pixel intensity using the mouse cursor. Here is the > code snippet: > > ... > fig = plt.figure() > ax1 = fig.add_subplot(111) > channel_select = 1 > p = imread(filename) # normally I use TIFF file > if (p.ndim > 2): > p1 = p[:,:,channel_select] # if more than 1 channel --> select > else: > p1 = p > > ax1.imshow(p1) > plt.show() > ... > > So far only the XY coordinates are displayed, but not as whole numbers and > even negative xy values are displayed, if the cursor is move to the corners > (???). And of course I would like the pixel intensity to be displayed ... > > Thanks, > > Sebi > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
markers are vector paths, so I don't think you can use images as markers. But you may overlay your images using imshow. The tricky part is to figure out the extents of the image. You may use OffsetImage http://matplotlib.sourceforge.net/trunk-docs/examples/pylab_examples/demo_annotation_box.html But, it is only available in the svn version of matplotlib. For example, you may do something like below import matplotlib.pyplot as plt from matplotlib.offsetbox import OffsetImage, AnnotationBbox import numpy as np if 1: ax = plt.subplot(111) xx = [0.22, 0.5, 0.83] yy = [0.5, 0.43, 0.63] ax.plot(xx, yy, "-") arr = np.arange(100).reshape((10,10)) im = OffsetImage(arr, zoom=2) for x1, y1 in zip(xx, yy): ab = AnnotationBbox(im, (x1, y1), xycoords='data', frameon=False) ax.add_artist(ab) -JJ On Tue, Feb 23, 2010 at 9:07 AM, t putkonen <tee...@gm...> wrote: > I would like to use custom symbols (markers) on both line charts and scatter > charts. The symbols I would like to use are currently stored in PNG files. > Is there a way to convert these images to markers? Symbols are pretty simple > and contain only one colour, and the background should be transparent. > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
On Tue, Feb 23, 2010 at 5:43 AM, Kornél Jahn <kja...@gm...> wrote: > Hi all! > > I am preparing a journal article and the figures should have a fixed width > of 3 inches, with as thin white border around as possible. The figure does > an imshow with equal axes: > My problem is: I do not know in advance the height of my figure to specify > figsize. The height should vary so that the whole figure (with ticks, > legends and colorbanr) fits tightly into a 3 x ? inch box. > > I have already tried bbox_inches='tight' for savefig and looked at HowTo > FAQ: automatically make room for tick labels for possible ideas but do no > have a clue yet. > Any suggestion is welcome. > Do you want you figure width to be exactly 3 inch? Otherwise, I wonder why bbox_inches="tight" does not work. My recommendation is 1) create a figure with high enough height. 2) adjust subplot parameters either manually or using the method described in the FAQ. 3) call savefig with tight bbox option. If you want your figure width to be exactly 3 inch, try something like below fig = figure(1, figsize=(3,7)) ax = subplot(111) ax.set_aspect(1) def get_tightbbox(renderer, fig=fig): from matplotlib.figure import Figure from matplotlib.transforms import Bbox bbox = Figure.get_tightbbox(fig, renderer) w, h = fig.get_size_inches() x1, y1, x2, y2 = bbox.extents return Bbox.from_extents(0, y1, w, y2) fig.get_tightbbox = get_tightbbox savefig("a.png", bbox_inches="tight") -JJ > Thx very much! > > Kornel > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Try ax = subplot(111, frame_on=False) ax.xaxis.set_visible(False) ax.yaxis.set_visible(False) table(cellText=cellText, colLabels=colLabels) -JJ On Tue, Feb 23, 2010 at 4:06 AM, HUSSAIN BOHRA <hus...@gm...> wrote: > Hi, > > Can any one tell me, How can I draw only a table in a figure (without XY > Cordinates) > > Please find my code below : > > # do this before importing pylab or pyplot > import matplotlib > > matplotlib.use('Agg') > from matplotlib.pyplot import figure > from matplotlib.table import table > from pylab import * > > fig = figure() > > > colLabels = ('Freeze', 'Wind', 'Flood', 'Quake', 'Hail') > rowLabels = ['%d year' % x for x in (100, 50, 20, 10, 5)] > cellText = [['66.4', '174.3', '75.1', '577.9', '32.0'], ['124.6', '555.4', > '153.2', '677.2', '192.5'], ['213.8', '636.0', '305.7', '1175.2', '796.0'], > ['292.2', '717.8', '456.4', '1368.5', '865.6'], ['431.5', '1049.4', '799.6', > '2149.8', '917.9']] > table(cellText=cellText, colLabels=colLabels) > fig.savefig('test12.png') > > and also the generated png in an attachment. > > Can any one tell me how can i remove XY axis and have only table ? > > -- > Hussain Bohra > Sr. Software Engineer > Tavant Technologies > Koramangala, Bangalore-95 > mailto: hus...@ta... > mobile: +91 99867 95727 > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
On 2/23/2010 3:44 PM, Friedrich Romstedt wrote: > http://www.friedrichromstedt.org/index.php?m=186 > It's definitely nice to have examples around, although I won't look at anything that's not explicitly BSD (or MIT) licensed. Somebody on the SciPy list (I'm forgetting at the moment) was working on a related project, so you may want to post there. Alan Isaac
The question has been answered I think in the thread "Graph gains a blank space at the right hand side" just some seconds ago. Am I wrong? Friedrich
Hi - more generally, is there any way to control the location of the median line, the vertical size of the box and the vertical location of the whiskers? Thanks - Ariel On Tue, Feb 23, 2010 at 11:32 AM, <PH...@ge...> wrote: > > # ~~~~~~~~~~~~~~~~~~~ > From: Ben Axelrod [mailto:BAx...@co...] > Sent: Tuesday, February 23, 2010 9:31 AM > To: mat...@li... > Subject: [Matplotlib-users] boxplot bug > > I found an inconsistency with how boxplots are rendered between version > 0.99.1 and the svn head. See attached images. I have never seen a boxplot > cross back on itself like this before. Is this the expected behavior? > > Thanks, > -Ben > # ~~~~~~~~~~~~~~~~~~~~ > > Ben, > > Yes it is expected behavior. Confidence intervals around the median can > easily go beyond the 1st and 3rd quartiles. If you're not comfortable with > this, throw the data into R. I'm confident you'll get a similar result. I > believe (not sure) that in the svn version you can specify that the CIs be > computed from a bootstrapped median. Doing so might tighten the CIs up a > bit. > > -Paul H. > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Ariel Rokem Helen Wills Neuroscience Institute University of California, Berkeley http://argentum.ucbso.berkeley.edu/ariel
On Mon, Feb 22, 2010 at 11:00 AM, Geoff Bache <geo...@gm...> wrote: > So I guess I have two questions. > 1) Is this a bug? It certainly feels like one... > 2) Is there a workaround / what should I do instead? > Try axessubplot2.autoscale_view(tight=True) Otherwise, you need to manually adjust xlim and ylim. Regards, -JJ
I would like to know whether the following project of mine: http://www.friedrichromstedt.org/index.php?m=186 is useful or not, because I don't know. I made an attempt to find something like what I tried some time ago, but I failed. Friedrich
I'm attempting to output an image with a predictable bounding box so that it can be placed into a KML document and be correctly georeferenced. Essentially I need a PNG that has NO labeling and the size of the image be exactly the size of the plot bounding box and no more, no less. I can get exactly what I want with the top and bottom of the image with: fig.add_axes((0,0,1,1) However, I'm still left with undesired space on the left and right. How can I bring the left and right edges of the bounding box to match the image width? Also, this might be a candidate for a handy function for pyplot.figure(). This could be very useful for anyone needing to make KML-friendly figures. Thanks for any ideas! Bruce --------------------------------------- Bruce W. Ford Clear Science, Inc. br...@cl... http://www.ClearScienceInc.com Phone/Fax: 904-379-9704 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford Google Talk: fo...@gm...
# ~~~~~~~~~~~~~~~~~~~ From: Ben Axelrod [mailto:BAx...@co...] Sent: Tuesday, February 23, 2010 9:31 AM To: mat...@li... Subject: [Matplotlib-users] boxplot bug I found an inconsistency with how boxplots are rendered between version 0.99.1 and the svn head. See attached images. I have never seen a boxplot cross back on itself like this before. Is this the expected behavior? Thanks, -Ben # ~~~~~~~~~~~~~~~~~~~~ Ben, Yes it is expected behavior. Confidence intervals around the median can easily go beyond the 1st and 3rd quartiles. If you're not comfortable with this, throw the data into R. I'm confident you'll get a similar result. I believe (not sure) that in the svn version you can specify that the CIs be computed from a bootstrapped median. Doing so might tighten the CIs up a bit. -Paul H.
Tornes, Ivan E wrote: > We have a very large data set that we are trying to plot in matplotlib. > We found that when you have multiple data points per pixel the backend > does not always pick the point with the largest value to draw. If you > resize the plot window it changes what is being shown on the figure. > Narrow features of the curve vary in amplitude on resize of the plot > window. Is there a built in solution to fix this? > > Yes, see http://www.mail-archive.com/mat...@li.../msg15628.html Eric > > Ivan E. Tornes Ph.D. > > Battelle > > 505 King Avenue > > Columbus, OH 43201-2693 > > > > Phone:614-424-5165 > > Fax:614-458-5165 > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
We have a very large data set that we are trying to plot in matplotlib. We found that when you have multiple data points per pixel the backend does not always pick the point with the largest value to draw. If you resize the plot window it changes what is being shown on the figure. Narrow features of the curve vary in amplitude on resize of the plot window. Is there a built in solution to fix this? Ivan E. Tornes Ph.D. Battelle 505 King Avenue Columbus, OH 43201-2693 Phone:614-424-5165 Fax:614-458-5165
Bruce Ford wrote: > I'm needing to keep two copies of a figure, with the properties > different on one copy. > > However with logic like below, both copies remain the same regardless: > > #I want one copy with the defaul background and one to be transparent... > > imgname = GenFilename(20)+".png" > imgsrc = "../dynamic/"+imgname > if kml == 1: > fig1 = fig > fig1.frameon = False > fig1.figurePatch.set_alpha(0.0) > imgname1 = imgname[:-4] + "-kml.png" > imgsrc1 = "../dynamic/"+imgname1 > fig1.savefig(imgsrc1,dpi=100,transparent=True) > fig.savefig(imgsrc,dpi=100) > > So, it appears that fig1=fig doesn't make a copy, but rather links > these figures. Is there a way to make a true separate figure that > will allow me to alter properties in the new copy without altering the > original. > > Thanks! > > Bruce > --------------------------------------- > Bruce W. Ford > Clear Science, Inc. > br...@cl... > http://www.ClearScienceInc.com > Phone/Fax: 904-379-9704 > 8241 Parkridge Circle N. > Jacksonville, FL 32211 > Skype: bruce.w.ford > Google Talk: fo...@gm... > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > Hello Bruce, Have you tried the standard Python copy/deepcopy function? My matplotlib knowledge is limited so there is probably a better approach, but that should work. -- jv
On 2/23/2010 12:03 PM, Bruce Ford wrote: > Is there a way to make a true separate figure that > will allow me to alter properties in the new copy without altering the > original. > def make_my_figure(): fig = plt.figure() ... return fig fig1 = make_my_figure() fig2 = make_my_figure() Alan Isaac
Hi, I cannot kill a plot by "ctrl+c" in a terminal (sending the SIGINT) when using the Qt4Agg backend. When using GTKAgg it works fine... What could be wrong? I need that. Thanx!
I'm needing to keep two copies of a figure, with the properties different on one copy. However with logic like below, both copies remain the same regardless: #I want one copy with the defaul background and one to be transparent... imgname = GenFilename(20)+".png" imgsrc = "../dynamic/"+imgname if kml == 1: fig1 = fig fig1.frameon = False fig1.figurePatch.set_alpha(0.0) imgname1 = imgname[:-4] + "-kml.png" imgsrc1 = "../dynamic/"+imgname1 fig1.savefig(imgsrc1,dpi=100,transparent=True) fig.savefig(imgsrc,dpi=100) So, it appears that fig1=fig doesn't make a copy, but rather links these figures. Is there a way to make a true separate figure that will allow me to alter properties in the new copy without altering the original. Thanks! Bruce --------------------------------------- Bruce W. Ford Clear Science, Inc. br...@cl... http://www.ClearScienceInc.com Phone/Fax: 904-379-9704 8241 Parkridge Circle N. Jacksonville, FL 32211 Skype: bruce.w.ford Google Talk: fo...@gm...
Hello, I'm (unsuccessfully) trying to generate a figure (with a labeled colorbar) having a black background. Here is the code. _purpose_ = 'demonstrate capability to create PNG with black background including labeled color bar' _author_ = 'jim...@no...' import numpy # http://numpy.scipy.org/ import matplotlib # http://matplotlib.sourceforge.net/index.html matplotlib.use('Agg') # http://matplotlib.sourceforge.net/backends.html -- probably the fastest, non-GUI, rendering backend import matplotlib.pyplot as plot # http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot import matplotlib.cm # color maps import sys assert sys.version == '2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]', sys.version assert numpy.__version__ == '1.4.0', numpy.__version__ assert matplotlib.__version__ == '0.99.1', matplotlib.__version__ data_min = 0 data_max = 256 data = numpy.random.randint(data_max, size=(512,512)) rows_cnt, columns_cnt = data.shape shape = rows_cnt, columns_cnt x = numpy.empty(data.shape, dtype=int) y = numpy.empty(data.shape, dtype=int) x[:] = numpy.arange(rows_cnt) y[:] = numpy.arange(columns_cnt) XI, YI = numpy.meshgrid(x[0], y[0]) title = 'this is the figure title' plot.clf() # clear the figure plot.title(title,color='white',backgroundcolor='black') plot.axis('off') colormap = 'gist_heat' config = dict(cmap=eval('matplotlib.cm.%s' % colormap), vmin=data_min, vmax=data_max) # vmin,vmax specify a fixed (color-map) scale plot.pcolormesh(XI, YI, data, **config) colorbar = plot.colorbar() ############################################################################################################################################################## # labels = ??? list of strings labels ??? labels = [str(i) for i in range(10)] colorbar.ax.set_yticklabels(labels, color='white') ############################################################################################################################################################## plot.imshow(data, interpolation='bilinear', cmap=config['cmap'], origin='upper', extent=[0,rows_cnt,0,columns_cnt]) # plot.show() # interactive filename = 'trial-plot-with-labeled-colorbar.png' plot.savefig(filename, facecolor='black') plot.close() which generates a figure with a black background and invisible (black) color bar labels. I'm probably going about this completely wrong. Questions: 1. How do I get white color bar labels? 2. How do I access the generated sequence of string labels (for use as the first set_yticklabels parameter) rather than artificially defining a list of labels? Thanks, -- jv
Gentlemen! Thanks a lot for your help. This works now for me (with and without the norm in the colorbar() call) Best, Jan On Tue, Feb 23, 2010 at 3:47 PM, John Hunter <jd...@gm...> wrote: > On Mon, Feb 22, 2010 at 6:28 PM, Eric Firing <ef...@ha...> wrote: > > Yes. You are looking at ColorbarBase, which does not have an associated > > mappable. The derived Colorbar class does grab the cmap and norm from > the > > mappable used in the initialization. Is this somehow not working? Did > you > > really need to specify the norm explicitly? > > No, I didn't test this, I just read the code (apparently the wrong > code) and concluded I needed it. I did just test w/o it and all is > well. Sorry for the noise. > > JDH >