[Matplotlib-users] How to use logarithmic scale with histogram?
Hi! I'm trying to generate some kind of "distribution" view / histogram of decimal numbers, i.e. i want the graph to indicate exactly how many times any given decimal number occurs in "x". As an example, i've set the values to tuple "x" as seen in the code snipplet below. In reality there will be at least couple of thousand decimal values or more in the tuple (x in this example) and values will be retrieved from file etc. This code does seem to draw some kind of histogram but it would be much more usefull to have at least the y-scale as logarithmic. But I haven't found a way to make the scale logarithmic. I've tried to use semilogy/semilogx/loglog but with no success. --- x=0.000925,0.000879,0.000926,0.00088,0.001016,0.000931,0.000927,0.00088, 0.000926,0.000926,0.000879,0.0009 n, bins, patches = hist(x, 1000) l = plot(bins, n, 'r--') grid(True) show() regards, Mika - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] RE : Re: transformations
On 2/6/07, Nicolas <[EMAIL PROTECTED]> wrote: > Thanks a lot for your reply. You're welcome. Please keep correspondence on the list so others an contribute and benefit. > I read this story of lazy value in the doc, but I didn't understand the link > with the the Affine function. All of the matplotlib transformations are by reference. We want to be able to do build the transform like so: a = someval t = Affine(a,b,c,d,e,f) and then later in the code do a.set(23) and have the transformation automatically updated. You can't do this if a is a scalar value (eg a float) so we have a custom class Value which stores a pointer to a float. When you do a = Value(23) t = Affine(a,b,c,d,e,f) and later do a.set(23) then t will be updated. We also support arithmetic on Values, so you can do z = Value(3) x = Value(2) t = Affine(z*x,b,c,d,e,f) and later if you do x.set(4) then the transform will be updated to have the value a=12 >From a user perspective, it means you need do do t = Affine(Value(a), Value(b), .) if a and b are floats. This is what the make_affine function that I posted does. > Additionnaly, I noticed that antialiasing doesn't seem to work anymore in > function pie with recent (ie. 0.87.5) version of matplotlib on WxAgg (?) Odd, I see that too. Haven't been able to pinpoint the problem yet... JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] wx figure window hangs w/macpython
I installed the pythonmac packages from http://pythonmac.org/packages/py24-fat/index.html : python2.4 wxpython2.6 numpy1.0.1 matplotlib-0.87.7 I called python with 'pythonw' and figure() draws a new figure window, but it hangs. Here are the relevant lines from my matplotlibrc file: CONFIGURATION BEGINS HERE --- backend : WXAgg numerix : numpy # numpy, Numeric or numarray interactive : True # see http://matplotlib.sourceforge.net/interactive.html #toolbar : toolbar2 # None | classic | toolbar2 #timezone : UTC# a pytz timezone string, eg US/Central or Europe/Paris #datapath : /home/jdhunter/mpldata Is this a misconfigured rc file? Or, should I be using ipython to handle the gui stuff? If I use ipython, what's the best way to install? From source? Python egg? Thanks -stephen - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] wx figure window hangs w/macpython
On 06/02/07, Stephen Uhlhorn <[EMAIL PROTECTED]> wrote: > I installed the pythonmac packages from > http://pythonmac.org/packages/py24-fat/index.html : > > python2.4 > wxpython2.6 > numpy1.0.1 > matplotlib-0.87.7 > > I called python with 'pythonw' and figure() draws a new figure window, > but it hangs. > > Here are the relevant lines from my matplotlibrc file: > > CONFIGURATION BEGINS HERE --- > backend : WXAgg > numerix : numpy # numpy, Numeric or numarray > interactive : True # see > http://matplotlib.sourceforge.net/interactive.html > #toolbar : toolbar2 # None | classic | toolbar2 > #timezone : UTC# a pytz timezone string, eg US/Central or > Europe/Paris > #datapath : /home/jdhunter/mpldata > > Is this a misconfigured rc file? Or, should I be using ipython to > handle the gui stuff? > > If I use ipython, what's the best way to install? From source? Python egg? > > Thanks > -stephen I had the same problem. Either you need to use TkAgg backend, or use ipython. making it from source is easy. Get ipython-0.7.3.tar.gz from http://ipython.scipy.org/dist/ Expand it cd .../ipython-0.7.3 sudo python setup.py install This puts executables into /Library/Frameworks/Python.framework/Versions/2.4/bin You need to make sure they are in your path either by adding /Library/Frameworks/Python.framework/Versions/2.4/bin to your path, or making symbolic links to a directory in your path. e.g. I did cd /usr/local/bin/ sudo ln -s /Library/Frameworks/Python.framework/Versions/2.4/bin/ipython . sudo ln -s /Library/Frameworks/Python.framework/Versions/2.4/bin/irunner . sudo ln -s /Library/Frameworks/Python.framework/Versions/2.4/bin/pycolor . rehash HTH. George Nurser. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] wx figure window hangs w/macpython
Thanks. Ipython worked like a charm. Are there any plans of putting ipython up with the other macpython packages? It seems like it's a pretty important piece of the mac/mpl puzzle. -stephen On 2/6/07, George Nurser <[EMAIL PROTECTED]> wrote: > > I had the same problem. Either you need to use TkAgg backend, or use ipython. > > making it from source is easy. > > Get ipython-0.7.3.tar.gz from http://ipython.scipy.org/dist/ > > Expand it > > cd .../ipython-0.7.3 > sudo python setup.py install > > This puts executables into > /Library/Frameworks/Python.framework/Versions/2.4/bin > > You need to make sure they are in your path either by adding > /Library/Frameworks/Python.framework/Versions/2.4/bin to your path, or > making symbolic links to a directory in your path. > e.g. I did > cd /usr/local/bin/ > sudo ln -s /Library/Frameworks/Python.framework/Versions/2.4/bin/ipython . > sudo ln -s /Library/Frameworks/Python.framework/Versions/2.4/bin/irunner . > sudo ln -s /Library/Frameworks/Python.framework/Versions/2.4/bin/pycolor . > rehash > > HTH. George Nurser. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to get a deepcopy of a subplot?
Hello, I try to generate dozens of plots where there is some static content for all plots and some content that changes. I'm porting the application from biggles to matplotlib. With biggles I could simply deepcopy the basis plot and add the content, but trying to deepcopy as my subplot instance I get: File "/data/tmp/hoel/GLPy_numpy_conversion/lib/gl/hatchcoamdeflect/hatchcoamdeflect.py", line 664, in plotHatches nplot = copy.deepcopy(plot) File "/usr/local/gltools/python/Python-2.5/lib/python2.5/copy.py", line 162, in deepcopy y = copier(x, memo) File "/usr/local/gltools/python/Python-2.5/lib/python2.5/copy.py", line 291, in _deepcopy_inst state = deepcopy(state, memo) File "/usr/local/gltools/python/Python-2.5/lib/python2.5/copy.py", line 162, in deepcopy y = copier(x, memo) File "/usr/local/gltools/python/Python-2.5/lib/python2.5/copy.py", line 254, in _deepcopy_dict y[deepcopy(key, memo)] = deepcopy(value, memo) File "/usr/local/gltools/python/Python-2.5/lib/python2.5/copy.py", line 188, in deepcopy "un(deep)copyable object of type %s" % cls) copy.Error: un(deep)copyable object of type Is there a way to get a deep copy of my object? I tried for artist in plot.get_child_artists(): if isinstance(artist, Line2D): nplot.add_line(artist) if isinstance(artist, Patch): nplot.add_patch(artist) else: nplot.add_artist(artist) but the result was not satisfying. The axes labels got copied also as, but what's worse (I could exclude Text instances), the scaling does not fit. The copied artists are painted much to large. Any tip avaliable? Thanks Berthold -- __ Address: G / \ L Germanischer Lloyd phone: +49-40-36149-7374 -++- Vorsetzen 35 P.O.Box 111606 fax : +49-40-36149-7320 \__/ D-20459 HamburgD-20416 Hamburg - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Trying
On 05/02/07, John Hunter <[EMAIL PROTECTED]> wrote:
On 2/5/07, Michael Lerner <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have some data where I'd like almost all of it to be plotted with a
> LinearSegmentedColormap that I've made, but I have a few special
> values that I'd like to set to specific colors (white, in this case).
> So, I made a LinearSegmentedColormap that works pretty well, but I'm
> having trouble with the rest. I found a nice-looking example at
>
> http://www.scipy.org/Cookbook/Matplotlib/Plotting_Images_with_Special_Values
>
> But, it doesn't work for me. In particular, it complains a lot about
> _lut. I'm using matplotlib 0.87.7 on an intel Mac running OS X and
> python 2.4.
On a very quick read, it appears that the sentinel map in that example
forgot to initialize the baseclass. Eg, you need
class SentinelMap(Colormap):
def __init__(self, cmap, sentinels={}):
Colormap.__init__(self) # init the base class
# boilerplate stuff - rest of init function here
See if that helps, and let us know. If you get it working, please fix
the wiki (you may have to sign up) and post your example along with
it.
Otherwise, please post a complete code example and we'll see what we can do.
JDH
>
> Can someone show me how to make a sentinel'd version of a
> LinearSegmentedColormap?
>
> Thank you,
>
> -Michael Lerner
I had the same problem that you did with the sentinels.py.
I modified the code so that it did work, and attach it here. you can
test it by running it. It only works with numpy, because it uses
fancy indexing. I'm pretty sure it's not done the fastest way.
You first make up the colormap instance for the real data, without any
sentinels.
then use the colormap instance as an argument to the sentinel
colormap. This is why it
doesn't do a Colormap.__init__(self). Not sure that's really best,
but i just followed the original method.
HTH. George Nurser.
from matplotlib.colors import Colormap, normalize
import matplotlib.numerix as nx
from matplotlib.numerix import alltrue,ma
from types import IntType, FloatType, ListType
class SentinelMap(Colormap):
def __init__(self, cmap, sentinels={}):
# boilerplate stuff
self.N = cmap.N
self.name = 'SentinelMap'
self.cmap = cmap
self.sentinels = sentinels
for rgb in sentinels.values():
if len(rgb)!=3:
raise ValueError('sentinel color must be RGB')
def __call__(self, scaledImageData, alpha=1):
# assumes the data is already normalized (ignoring sentinels)
# clip to be on the safe side
rgbaValues = self.cmap(nx.clip(scaledImageData, 0.,1.))
for sentinel,rgb in self.sentinels.items():
r,g,b = rgb
if (scaledImageData==sentinel).max():
rgbaValues[...,0] = nx.where(scaledImageData==sentinel, r, rgbaValues[...,0])
rgbaValues[...,1] = nx.where(scaledImageData==sentinel, g, rgbaValues[...,1])
rgbaValues[...,2] = nx.where(scaledImageData==sentinel, b, rgbaValues[...,2])
rgbaValues[...,3] = nx.where(scaledImageData==sentinel, alpha, rgbaValues[...,3])
return rgbaValues
class SentinelNorm(normalize):
"""
Leave the sentinel unchanged
"""
def __init__(self, ignore=[], vmin=None, vmax=None, clip = True):
self.vmin=vmin
self.vmax=vmax
self.clip = clip
print 'in init vmax=',vmax,'vmin=',vmin
if type(ignore) in [IntType, FloatType]:
self.ignore = [ignore]
else:
self.ignore = list(ignore)
self.ignore_mask=None
def __call__(self, value, clip=None):
if clip is None:
clip = self.clip
# ensure that we have a masked array val to work with
if isinstance(value, (int, float)):
vtype = 'scalar'
val = ma.array([value])
else:
vtype = 'array'
if ma.isMA(value):
val = value
else:
val = ma.asarray(value)
# create ignore_mask, val=sentinel1 | val= sentinel2..
if self.ignore is not None:
self.get_ignore_mask(val)
# find min and max over points not masked by ignore_mask or by original mask of val
self.autoscale(val)
# now do scaling
vmin, vmax = self.vmin, self.vmax
if vmin > vmax:
if False in val.mask:
raise ValueError("minvalue must be less than or equal to maxvalue")
else:
# array is completely masked. doesn't matter what values are for plot
return 0.*value
elif vmin==vmax:
return 0.*value
else:
# scale points not masked by ignore_mask or by original mask of val
scale = 1./(vmax-vmin)
result = (val-vmin)*scale
if clip:
result = nx
[Matplotlib-users] Bug in xaxis_date ?
Folks, I have a problem with xaxis_date in the SVN (rev2994) #-- def xaxis_date(self, tz=None): """Sets up x-axis ticks and labels that treat the x data as dates. tz is the time zone to use in labeling dates. Defaults to rc value. """ thislocator = self.xaxis.get_major_locator() if not isinstance(thislocator, DateLocator): locator = AutoDateLocator(tz) self.xaxis.set_major_locator(locator) thisformatter = self.xaxis.get_major_formatter() if not isinstance(thisformatter, DateFormatter): formatter = AutoDateFormatter(locator) self.xaxis.set_major_formatter(formatter) #-- The problem is that in the second if, locator can still be undefined if thislocator was a DateLocator. The first if could have a else clause: # self.xaxis.set_major_locator(locator) else: locator = thislocator #- Which seems to solve the problem (Of course, the same apply to yaxis_date). John, Eric, or whoever else has write access, could you take care of that ? Thanks a lot in advance P. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] QTagg, Latex, Label problem
Dear All,
I am new to matplotlib and playing around with it. I am interested in
embedding in Qt, displaying TeX within such a window and finally
save the plot as postscript.
So I modified the embedding_in_qt example and added at the beginning
rc('text', usetex=True)
to prepare for TeX
and modified the (according agg_oo example):
def compute_initial_figure(self):
t = arange(0.0, 3.0, 0.01)
s = sin(2*pi*t)
self.axes.set_ylabel(r"\TeX\ is Number
$\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", fontsize=16,
color='r')
self.axes.set_xlabel("label")
self.axes.plot(t, s)
#self.print_figure("test.eps")
function, to create labels (with TeX) but they are not displayed.
Additionally if I include self.print_figure("test.eps")
File "embedding_in_qt.py", line 67, in compute_initial_figure
self.print_figure("test.eps")
File
"D:\APPS\PYTON2~1\Lib\site-packages\matplotlib\backends\backend_qtagg.py",
line 159, in print_figure
agg = self.switch_backends( FigureCanvasAgg )
File
"D:\APPS\PYTON2~1\Lib\site-packages\matplotlib\backend_bases.py", line
944, in switch_backends
newCanvas = FigureCanvasClass(self.figure)
AttributeError: figure
I am on WindowsXP, python 2.3.5 and matplotlib 0.87.6
The complete example is below.
Thank you very much
gerhard
import sys, os, random
from qt import *
from matplotlib import rc
from matplotlib.numerix import arange, sin, pi
from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as
FigureCanvas
from matplotlib.figure import Figure
rc('text', usetex=True)
# This seems to be what PyQt expects, according to the examples shipped in
# its distribution.
TRUE = 1
FALSE = 0
progname = os.path.basename(sys.argv[0])
progversion = "0.1"
# Note: color-intensive applications may require a different color
allocation
# strategy.
QApplication.setColorSpec(QApplication.NormalColor)
app = QApplication(sys.argv)
class MyMplCanvas(FigureCanvas):
"""Ultimately, this is a QWidget (as well as a FigureCanvasAgg,
etc.)."""
def __init__(self, parent=None, width=5, height=4, dpi=100):
self.fig = Figure(figsize=(width, height), dpi=dpi)
self.axes = self.fig.add_subplot(111)
# We want the axes cleared every time plot() is called
self.axes.hold(False)
self.compute_initial_figure()
FigureCanvas.__init__(self, self.fig)
self.reparent(parent, QPoint(0, 0))
FigureCanvas.setSizePolicy(self,
QSizePolicy.Expanding,
QSizePolicy.Expanding)
FigureCanvas.updateGeometry(self)
def sizeHint(self):
w, h = self.get_width_height()
return QSize(w, h)
def minimumSizeHint(self):
return QSize(10, 10)
def compute_initial_figure(self):
t = arange(0.0, 3.0, 0.01)
s = sin(2*pi*t)
self.axes.set_ylabel(r"\TeX\ is Number
$\displaystyle\sum_{n=1}^\infty\frac{-e^{i\pi}}{2^n}$!", fontsize=16,
color='r')
self.axes.set_xlabel("label")
self.axes.plot(t, s)
#self.print_figure("test.eps")
class ApplicationWindow(QMainWindow):
def __init__(self):
QMainWindow.__init__(self, None,
"application main window",
Qt.WType_TopLevel | Qt.WDestructiveClose)
self.file_menu = QPopupMenu(self)
self.file_menu.insertItem('&Quit', self.fileQuit, Qt.CTRL +
Qt.Key_Q)
self.menuBar().insertItem('&File', self.file_menu)
self.help_menu = QPopupMenu(self)
self.menuBar().insertSeparator()
self.menuBar().insertItem('&Help', self.help_menu)
self.help_menu.insertItem('&About', self.about)
self.main_widget = QWidget(self, "Main widget")
l = QVBoxLayout(self.main_widget)
sc = MyMplCanvas(self.main_widget, width=5, height=4, dpi=100)
l.addWidget(sc)
self.main_widget.setFocus()
self.setCentralWidget(self.main_widget)
self.statusBar().message("All hail matplotlib!", 2000)
def fileQuit(self):
qApp.exit(0)
def closeEvent(self, ce):
self.fileQuit()
def about(self):
QMessageBox.about(self, "About %s" % progname,
u"""%(prog)s version %(version)s
Copyright \N{COPYRIGHT SIGN} 2005 Florent Rougon
This program is a simple example of a Qt application embedding matplotlib
canvases.
It may be used and modified with no restriction; raw copies as well as
modified versions may be distributed without limitation."""
% {"prog": progname, "version": progversion})
def main():
aw = ApplicationWindow()
aw.setCaption("%s" % progname)
qApp.setMainWidget(aw)
aw.show()
sys.exit(qApp.exec_loop())
if __name__ == "__main__": main()
--
Gerhard Spitzlsperger
Renesas Semiconductor Europe (Landsh
Re: [Matplotlib-users] QTagg, Latex, Label problem
On Tuesday 06 February 2007 01:28:10 pm Gerhard Spitzlsperger wrote:
> I am new to matplotlib and playing around with it. I am interested in
> embedding in Qt, displaying TeX within such a window and finally
> save the plot as postscript.
[...]
> and modified the (according agg_oo example):
>
> def compute_initial_figure(self):
[...]
> function, to create labels (with TeX) but they are not displayed.
The example you posted works fine for me. Are you sure you have installed and
properly configured all the required external dependencies? See
http://www.scipy.org/Cookbook/Matplotlib/UsingTex for more details.
> Additionally if I include self.print_figure("test.eps")
>
>File "embedding_in_qt.py", line 67, in compute_initial_figure
> self.print_figure("test.eps")
>File
> "D:\APPS\PYTON2~1\Lib\site-packages\matplotlib\backends\backend_qtagg.py",
> line 159, in print_figure
> agg = self.switch_backends( FigureCanvasAgg )
>File
> "D:\APPS\PYTON2~1\Lib\site-packages\matplotlib\backend_bases.py", line
> 944, in switch_backends
> newCanvas = FigureCanvasClass(self.figure)
> AttributeError: figure
Your class MyMplCanvas needs a figure attribute. Change all self.fig
references to self.figure (see attached).
Darren
EmbeddingInQt_UseTeX.py
Description: application/python
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Newbie trying to get matplotlib up and running on Mac mini.....
Jonathan Kane wrote: > The file I downloaded was ScipySuperpack-Intel-10.4-py2.4 > matplotlib was a part of that package. Who built/maintains that package? Anyone know what back-ends it supports? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Newbie trying to get matplotlib up and running on Mac mini.....
Christopher Barker wrote: > Jonathan Kane wrote: >> The file I downloaded was ScipySuperpack-Intel-10.4-py2.4 >> matplotlib was a part of that package. > > Who built/maintains that package? Chris Fonnesbeck. http://trichech.us/?page_id=4 > Anyone know what back-ends it supports? I only see _ns_backend_agg.so and _tkagg.so so I imagine it only support TkAgg for the GUI (and possibly whatever backends that don't require extension modules). -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Newbie trying to get matplotlib up and running on Mac mini.....
Robert Kern wrote: >> Who built/maintains that package? > > Chris Fonnesbeck. http://trichech.us/?page_id=4 > > I only see _ns_backend_agg.so and _tkagg.so so I imagine it only support TkAgg > for the GUI (and possibly whatever backends that don't require extension > modules). That explains why I haven't leaped on it -- I need wx. Maybe I'll see if I can help him get set up to build wxAgg also, and we'll have our cake and be able to eat it too... Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] DIscretization of colorbar
Claas Teichmann wrote: > Hi David and Eric, > > one year ago, you discussed a discretazation of the colorbar with > imshow() in matplotlib-users. The topic was "DIscretization of > colorbar". Did you succeed in using a discrete colorbar? Yes, I completely rewrote the colorbar code, and it is now quite flexible. > > I put a request to the mailinglist with the topic "Wrong > colorbar-ticks in imshow-colorbar with 10 colors". Maybe one of you > already got the answer? > > Many greetings! > > Claas :-) Assuming you have a reasonably recent version of mpl, you can modify your colorbar call this way: colorbar(ticks=linspace(im.norm.vmin, im.norm.vmax, 11)) (This is for your example with a 10-entry colormap.) Because of a default parameter that is not exposed, it will label only every second color boundary in the example from your earlier message. To make it label every boundary, you could use from matplotlib import ticker ticks = linspace(im.norm.vmin, im.norm.vmax, 11) tickmaker = ticker.FixedLocator(ticks, nbins=20) # make nbins >= number of ticks colorbar(ticks=tickmaker) Eric - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] ANN: matplotlib-0.90.0
http://www.python.org/pypi/matplotlib/0.90.0 http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474&release_id=484485 Binaries will be posted in a few days. === 2007-02-06 Released 0.90.0 at revision 3003 2007-01-22 Extended the new picker API to text, patches and patch collections. Added support for user customizable pick hit testing and attribute tagging of the PickEvent - Details and examples in examples/pick_event_demo.py - JDH 2007-01-16 Begun work on a new pick API using the mpl event handling frameowrk. Artists will define their own pick method with a configurable epsilon tolerance and return pick attrs. All artists that meet the tolerance threshold will fire a PickEvent with artist dependent attrs; eg, a Line2D can set the indices attribute that shows the indices into the line that are within epsilon of the pick point. See examples/pick_event_demo.py. The implementation of pick for the remaining Artists remains to be done, but the core infrastructure at the level of event handling is in place with a proof-of-concept implementation for Line2D - JDH 2007-01-16 src/_image.cpp: update to use Py_ssize_t (for 64-bit systems). Use return value of fread() to prevent warning messages - SC. 2007-01-15 src/_image.cpp: combine buffer_argb32() and buffer_bgra32() into a new method color_conv(format) - SC 2007-01-14 backend_cairo.py: update draw_arc() so that examples/arctest.py looks correct - SC 2007-01-12 backend_cairo.py: enable clipping. Update draw_image() so that examples/contour_demo.py looks correct - SC 2007-01-12 backend_cairo.py: fix draw_image() so that examples/image_demo.py now looks correct - SC 2007-01-11 Added Axes.xcorr and Axes.acorr to plot the cross correlation of x vs y or the autocorrelation of x. pylab wrappers also provided. See examples/xcorr_demo.py - JDH 2007-01-10 Added "Subplot.label_outer" method. It will set the visibility of the ticklabels so that yticklabels are only visible in the first column and xticklabels are only visible in the last row - JDH 2007-01-02 Added additional kwarg documentation - JDH 2006-12-28 Improved error message for nonpositive input to log transform; added log kwarg to bar, barh, and hist, and modified bar method to behave sensibly by default when the ordinate has a log scale. (This only works if the log scale is set before or by the call to bar, hence the utility of the log kwarg.) - EF 2006-12-27 backend_cairo.py: update draw_image() and _draw_mathtext() to work with numpy - SC 2006-12-20 Fixed xpdf dependency check, which was failing on windows. Removed ps2eps dependency check. - DSD 2006-12-19 Added Tim Leslie's spectral patch - JDH 2006-12-17 Added rc param 'axes.formatter.limits' to control the default threshold for switching to scientific notation. Added convenience method Axes.ticklabel_format() for turning scientific notation on or off on either or both axes. - EF 2006-12-16 Added ability to turn control scientific notation in ScalarFormatter - EF 2006-12-16 Enhanced boxplot to handle more flexible inputs - EF 2006-12-13 Replaced calls to where() in colors.py with much faster clip() and putmask() calls; removed inappropriate uses of getmaskorNone (which should be needed only very rarely); all in response to profiling by David Cournapeau. Also fixed bugs in my 2-D array support from 12-09. - EF 2006-12-09 Replaced spy and spy2 with the new spy that combines marker and image capabilities - EF 2006-12-09 Added support for plotting 2-D arrays with plot: columns are plotted as in Matlab - EF 2006-12-09 Added linewidth kwarg to bar and barh; fixed arg checking bugs - EF 2006-12-07 Made pcolormesh argument handling match pcolor; fixed kwarg handling problem noted by Pierre GM - EF 2006-12-06 Made pcolor support vector X and/or Y instead of requiring 2-D arrays - EF 2006-12-05 Made the default Artist._transform None (rather than invoking identity_transform for each artist only to have it overridden later). Use artist.get_transform() rather than artist._transform, even in derived classes, so that the default transform will be created lazily as needed - JDH 2006-12-03 Added LogNorm to colors.py as illustrated by examples/pcolor_log.py, based on suggestion by Jim McDonald. Colorbar modified to handle LogNorm. Norms have additional "inverse" method. - EF 2006-12-02 Changed cla
