Re: [Matplotlib-users] How to control display precision and style (e.g., %f or %e) of axis tick labels?

2010-02-23 Thread Stephen George
David Goldsmith wrote: I've searched and searched the online docs...please help. DG If I understand your question correctly you probably need to look at http://matplotlib.sourceforge.net/api/ticker_api.html#tick-formatting ax.xaxis.set_major_formatter( xmajorFormatter )

[Matplotlib-users] Draw only table {without XY Axis}

2010-02-23 Thread HUSSAIN BOHRA
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 *

Re: [Matplotlib-users] hexbin log bins and colorbar

2010-02-23 Thread Jan Strube
Hi John, thanks for keeping at it. I have updated from svn But this script import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import LogFormatter from matplotlib import colors class LogFormatterHB(LogFormatter): def

Re: [Matplotlib-users] Pydot graphs in matplotlib?

2010-02-23 Thread Kjell Magne Fauske
Erik Tollerud-2 wrote: I'm curious if anyone knows a good way to embed pydot (http://code.google.com/p/pydot/) graphs (or really, any graphviz-style graphs) inside matplotlib somehow. The closest thing is probably NetworkX (http://networkx.lanl.gov/index.html) and PyGraphviz

[Matplotlib-users] Importing pylab causes exception

2010-02-23 Thread Jon Moore
Hi, I'm using the Python(x,y) distribution which comes with matplotlib for Windows. My OS is Windows XP with all updates and service packs on an AMD Athlon 2600+ PC with ATI Radeon 9600 graiphics card. Python will work fine for anything that doesn't import the pylab component (I can import

[Matplotlib-users] Auto-adjusting figure height, imshow equal

2010-02-23 Thread Kornél Jahn
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

[Matplotlib-users] How to create customer symbol from PNG file?

2010-02-23 Thread t putkonen
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

[Matplotlib-users] Display Pixel intensity

2010-02-23 Thread Sebastian Rhode
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

Re: [Matplotlib-users] hexbin log bins and colorbar

2010-02-23 Thread John Hunter
On Tue, Feb 23, 2010 at 4:12 AM, Jan Strube curious...@gmail.com wrote: Hi John, thanks for keeping at it. I have updated from svn But this script   File /Users/Jan/PYTHON/lib/python2.6/site-packages/matplotlib-1.0.svn_r8037-py2.6-macosx-10.6-universal.egg/matplotlib/colorbar.py, line 278,

Re: [Matplotlib-users] hexbin log bins and colorbar

2010-02-23 Thread John Hunter
On Mon, Feb 22, 2010 at 6:28 PM, Eric Firing efir...@hawaii.edu 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

[Matplotlib-users] hist(x,bins) is not properly autoscaled in y

2010-02-23 Thread Yannick Copin
Hi, I think there's an issue of axes autoscaling in y when plotting histograms with specified bins, eg. code from pylab import * bins = linspace(-5,5,100) hist(randn(1000), bins=bins, histtype='step', ec='r') hist(randn(1), bins=bins, histtype='step', ec='g') show() /code

Re: [Matplotlib-users] hexbin log bins and colorbar

2010-02-23 Thread Jan Strube
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 jdh2...@gmail.com wrote: On Mon, Feb 22, 2010 at 6:28 PM, Eric Firing efir...@hawaii.edu wrote: Yes. You are looking

[Matplotlib-users] configuring colorbar labels on a black background

2010-02-23 Thread Jim Vickroy
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.vick...@noaa.gov' import numpy #

[Matplotlib-users] A second copy of a figure

2010-02-23 Thread Bruce Ford
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 =

[Matplotlib-users] Qt4Agg backend and SIGINT (ctrl+c)

2010-02-23 Thread Nicolas Bigaouette
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! -- Download Intel#174; Parallel Studio

Re: [Matplotlib-users] A second copy of a figure

2010-02-23 Thread Alan G Isaac
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 =

Re: [Matplotlib-users] A second copy of a figure

2010-02-23 Thread Jim Vickroy
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

[Matplotlib-users] boxplot bug

2010-02-23 Thread Ben Axelrod
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 Axelrod Robotics Engineer (800) 641-2676 x737

[Matplotlib-users] resolution issues

2010-02-23 Thread Tornes, Ivan E
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

Re: [Matplotlib-users] resolution issues

2010-02-23 Thread Eric Firing
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

[Matplotlib-users] PNG images and image area

2010-02-23 Thread Bruce Ford
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

[Matplotlib-users] Embedding matplotlib in Tkinter Applications

2010-02-23 Thread Friedrich Romstedt
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

Re: [Matplotlib-users] Graph gains a blank space at the right hand side

2010-02-23 Thread Jae-Joon Lee
On Mon, Feb 22, 2010 at 11:00 AM, Geoff Bache geoff.ba...@gmail.com 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

Re: [Matplotlib-users] boxplot bug

2010-02-23 Thread Ariel Rokem
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, phob...@geosyntec.com wrote: # ~~~ From: Ben Axelrod

Re: [Matplotlib-users] PNG images and image area

2010-02-23 Thread Friedrich Romstedt
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 -- Download Intel#174; Parallel Studio Eval Try the new software tools

Re: [Matplotlib-users] Draw only table {without XY Axis}

2010-02-23 Thread Jae-Joon Lee
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 hussainbo...@gmail.com wrote: Hi, Can any one tell me, How can I draw only a table in a figure

Re: [Matplotlib-users] Embedding matplotlib in Tkinter Applications

2010-02-23 Thread Alan G Isaac
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

Re: [Matplotlib-users] Auto-adjusting figure height, imshow equal

2010-02-23 Thread Jae-Joon Lee
On Tue, Feb 23, 2010 at 5:43 AM, Kornél Jahn kjahn.pub...@gmail.com 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

Re: [Matplotlib-users] How to create customer symbol from PNG file?

2010-02-23 Thread Jae-Joon Lee
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

Re: [Matplotlib-users] Display Pixel intensity

2010-02-23 Thread Jae-Joon Lee
See http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg13203.html http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg13204.html -JJ On Tue, Feb 23, 2010 at 9:22 AM, Sebastian Rhode sebrh...@googlemail.com wrote: Hi, has anyone a good idea how to

Re: [Matplotlib-users] configuring colorbar labels on a black background

2010-02-23 Thread Jae-Joon Lee
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

Re: [Matplotlib-users] boxplot bug

2010-02-23 Thread Gökhan Sever
On Tue, Feb 23, 2010 at 3:02 PM, Ariel Rokem aro...@berkeley.edu 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

Re: [Matplotlib-users] PNG images and image area

2010-02-23 Thread Jae-Joon Lee
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 =

Re: [Matplotlib-users] boxplot bug

2010-02-23 Thread Ariel Rokem
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,

Re: [Matplotlib-users] boxplot bug

2010-02-23 Thread Gökhan Sever
On Tue, Feb 23, 2010 at 5:04 PM, Ariel Rokem aro...@berkeley.edu 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

[Matplotlib-users] Looping through all the built-in colormaps

2010-02-23 Thread David Goldsmith
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)

Re: [Matplotlib-users] hoe to update a plot

2010-02-23 Thread C M
On Tue, Feb 23, 2010 at 7:00 PM, Mathew Yeates mat.yea...@gmail.com wrote: Hi I am using gtk and displaying a plot in a FigureCanvas. In response to an event, I want to update the plot with new data. e.g. self.fig = Figure(figsize=(5,5), dpi=100) self.ax = fig.add_subplot(111)

Re: [Matplotlib-users] hoe to update a plot

2010-02-23 Thread Stephen George
C M wrote: On Tue, Feb 23, 2010 at 7:00 PM, Mathew Yeates mat.yea...@gmail.com wrote: Hi I am using gtk and displaying a plot in a FigureCanvas. In response to an event, I want to update the plot with new data. e.g. self.fig = Figure(figsize=(5,5), dpi=100) self.ax =

Re: [Matplotlib-users] hoe to update a plot

2010-02-23 Thread Mathew Yeates
This looks correct. I went and look at the animation examples and they do something similar. Thx -- Forwarded message -- From: Stephen George steve_...@optusnet.com.au Date: Tue, Feb 23, 2010 at 6:28 PM Subject: Re: [Matplotlib-users] hoe to update a plot To: Matplotlib Users

Re: [Matplotlib-users] boxplot bug

2010-02-23 Thread Ariel Rokem
No - not the 'widths' kwarg. I want something that *looks* like the boxplot, but for which I will have control of setting the ranges delimited by the box and delimited by the whiskers (in the vertical dimension, not the horizontal dimension). I resorted to hacking something from the existing code