Hi all,
I'm wondering if anyone knows how to compute colorbar limits (vmin, vmax)
based only on the visible portion of the figure. My use-case is a
pcolormesh(x, y, z) drawn over a Basemap instance. The coordinates x and y
cover the entire globe, but I'm only mapping the Arctic. What happens is
th
', 'before',
'after', 'nearest', that should help with your use case.
If this does not fix the problem you are seeing, I'd appreciate having a
copy of the file and code to reproduce the problem and find a solution.
HTH,
David Huard
On Mon, Sep 7,
I'd also be interested in a workaround. I tried to remove the tick labels
from the second axe, but it also removed the labels from the first axe.
Thanks,
David
On Sun, Feb 8, 2009 at 9:14 AM, Christoffer Aberg <
christoffer.ab...@fkem1.lu.se> wrote:
> Hi all,
>
> I have noticed a funny behaviou
Have you tried pdfcrop ? It computes margin automatically, you could then
transfer the file back to eps.
David
PDFCROP 1.5, 2004/06/24 - Copyright (c) 2002, 2004 by Heiko Oberdiek.
Syntax: pdfcrop [options] [output file]
Function: Margins are calculated and removed for each page in the file.
O
I'd like to thank all those who participated in fixing this bug. It's much
appreciated.
David
2007/10/29, John Hunter <[EMAIL PROTECTED]>:
>
> On 10/29/07, Michael Droettboom <[EMAIL PROTECTED]> wrote:
>
> > I submitted a fix for this in matplotlib SVN r4047. Freetype takes a
> > FT_LOAD_FORCE_A
Hi Alan,
There is an empiricalcdf function in scipy/sandbox/dhuard/stats.py
It's not fancy but it might do what you want.
David
2007/9/26, Alan Isaac <[EMAIL PROTECTED]>:
>
> Is there a standard function or practice for
> plotting the CDF of a series? (I am aware
> of the output of hist.)
>
> T
Hi Dirk,
If you haven't already done so, look at the numpy.ma module. It provides a
masked array object that deals gracefully with missing values. To the best
of my knowledge, most matplotlib functions understand masked arrays and deal
with it accordingly, exception made of those requiring a full
Hi Peter,
this is also the behavior of the numpy histogram function. I personally
don't like it, but I think it's kept for compatibility's sake with Numeric.
You could use
def histogram(a, bins):
n = sort(a).searchsorted(bins)
n = concatenate([n, [len(a)]])
count = concatenate([[n[0]],
You can also take a look at the wiki
http://www.scipy.org/Cookbook/Matplotlib/ColormapTransformations
There you'll find the code I had about colormap discretization. Maybe it
does the same thing Eric discussed, however.
Cheers,
David
2007/2/6, Eric Firing <[EMAIL PROTECTED]>:
Claas Teichmann
Salut Nicolas,
You can get by with something like:
a = arange(nrow*ncol)+1
indices = hstack(a.reshape(nrow, ncol).T)
for i in indices:
subplot(nrow, ncol, i)
...
David
2007/1/15, Nicolas Bigaouette <[EMAIL PROTECTED]>:
Hi,
I want to compare data and I am doing so with subplots. Ideal
Hi, is there a limit to the number of times one can call ax.plot(x,y) ?Thanks,David
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your
configuration file... sorry 2006/10/5, François Beaubert <[EMAIL PROTECTED]>:
Hi all,I have look in the doc and examples but was unable to find a way to controlthe thickness of the major and minor tick on the axis.Forgive me for this very basic question but if you now a way to do that...
Thanks a l
François, These options can be found in the matplotlibrc configuration figure, or can be set at runtime using the rc command. David2006/10/5, François Beaubert <
[EMAIL PROTECTED]>:
Hi all,I have look in the doc and examples but was unable to find a way to controlthe thickness of the major and mino
Hi,To remove the ticklabels, you could do it with something like[ax.xaxis.set_ticklabels([]) for ax in f.axes[:-1]]David2006/9/14, Jose Gomez-Dans <
[EMAIL PROTECTED]>:Hi!I am coding a little application that shows a number of subplots (of
the 511, 512...515 type) stacked up. They all have the same
Hi, I'm a little bit lost with respect to setting the resolution of images saved in png.The matplotlibrc file sets the dpi to 80, but the default keyword argument of savefig is set to 150. Thus, changing the rc setting
to dpi=300 does not modify savefig's default behaviour. Is there a way to set
Hi all, Is there a way to align text vertically so that the characters sit on a continuous line ? When I dotext(.5, .5, 'abc', verticalalignment='center')text(.6, .5, 'pqr', verticalalignment='center')
both words are not aligned since the bars of p and q push the text upwards. I get similar problem
Hi, It's pretty hard to figure out exactly what your problem is without more info. Did you check that the scaling was identical in gnuplot and matplotlib ? matplotlib will set the axes so that all data are included in the figure, so if you have large outliers, the scaling will be too large and its
There is a nice little trick where you can make two axes share the
same xaxis. Then when you pan or zoom on one, the other isautomagically changed toax1 = subplot(211)ax2 = subplot(212, sharex=ax1)But that's not retroactive, or is it ? i.e. if ax2 has a wider x range than ax1, it won't show up.
f
Hi John, Thanks for taking the time to answer a badly formulated question. With your indications, I have been able to get an example working.The point was that I had a function with a number of arguments that returned a
subplot(111) instance. Inside this function there are thousands of
calls to pl
Hi, I have a function fig(x) that returns a subplot instance,and I'd like to make a new figure by calling this function twice. For example:def fig(x): s = subplot(111) return s.plot(x)
and i wan't to do something like:fig = figure(figsize = (6,12))fig.add_axes(fig(x1))fig.add_axes(fig(x2))ax
m a continuous range. Example : >>> _palette_data = cpt2seg('palette.cpt') >>> palette = matplotlib.colors.LinearSegmentedColormap
('palette',_palette_data, 100) >>> imshow(X, cmap=palette) Licence: MIT Author: David Huard, 2006 "&
Hi, Numpy has a logspace function, so it may be a bad idea to create a function in pylab with the same name that does something slightly different.def logspace(start,stop,num=50,endpoint=True,base=10.0): """Evenly spaced numbers on a logarithmic scale.
Computes int(num) evenly spaced exponen
Hi, I'd do it the quick way:str = [...] # list of strings for the labels.x[:] # abcisse vectory[i][:] # list of ordinate vector (y[i][:] contains the data for the ith line)for i in range(10):
text(x[-1], y[i][-1], str[i], horizontalalignement='left')David2006/6/7, Webb Sprague <[EMAIL PROTECTED
array (Nbin + 1) normed: Normalization factor. Setting it to True will normed the density to 1. weighted : Boolean indicating whether or not the data is weighted.
"""
# License: MIT
# Author: David Huard
# Changes log
# 2006, June 2: Completed object interface
# May : S
Hum,
I did, but it is still pretty rough. I did some changes to it a while ago to use objects and it still isn't complete.
I'll try to get the class in working order by the weekend.
Cheers,
David
25 matches
Mail list logo