Re: [Matplotlib-users] Bar graph performance

2010-05-04 Thread Eric Firing
On 05/03/2010 11:45 PM, Kun Hong wrote: > Eric, > > Thanks a lot for the pointers. Sorry for the double posting. > > I tried fill_between, which works better than bar graph. > But I need to change the data set to be able to get the filling > into a nicely-formed rectangle, and the performance is st

Re: [Matplotlib-users] Bar graph performance

2010-05-02 Thread Eric Firing
On 05/02/2010 05:48 PM, Kun Hong wrote: > Hi, > > I am new to matplotlib. So if I ask sth stupid, please bear with me. > > I am using matplotlib to present large data set in different graph > types, > bar, dot, line, etc. I find that the bar graph has very bad performance. > Say, I draw data point

Re: [Matplotlib-users] Bar graph performance

2010-05-02 Thread Eric Firing
On 05/02/2010 05:48 PM, Kun Hong wrote: > Hi, > > I am new to matplotlib. So if I ask sth stupid, please bear with me. > > I am using matplotlib to present large data set in different graph > types, > bar, dot, line, etc. I find that the bar graph has very bad performance. > Say, I draw data point

Re: [Matplotlib-users] question about axis scale multiplier

2010-04-30 Thread Eric Firing
Margherita Vittone wiersma wrote: > HI, > i am making a scatter plot and i simply use defaults for tick formatting etc; > when i plot the data the plot show on the x axis a multiplier scaling with > scintific notation; > i would like to get rid of it , the data looks like this: > > values5 = > [

Re: [Matplotlib-users] Transparent figures no longer working

2010-04-30 Thread Eric Firing
T J wrote: On Wed, Apr 28, 2010 at 12:22 PM, Eric Firing wrote: It's a bug, made more confusing by the trickery that is done when printing a figure. DPI, facecolor, and edgecolor that are set for a figure object are used only for screen display, and are overridden when the figure is

Re: [Matplotlib-users] How to set constant y-axis scale value

2010-04-29 Thread Eric Firing
melloncx wrote: > Hello, > > I am quite new in matplotlib, I am now facing a quite simple problem but > have no idea to solve. I just want set the y axis scale to value 100, which > means in the image, the y axis is always of scale 100, because the points in > my image indicates the percentage val

Re: [Matplotlib-users] Transparent figures no longer working

2010-04-28 Thread Eric Firing
T J wrote: > On Mon, Apr 26, 2010 at 12:28 PM, T J wrote: >> On Mon, Apr 26, 2010 at 12:01 PM, Jae-Joon Lee wrote: >>> Looking at the code, the "transparent" option set alphas of paches to >>> 0, which I think is simply ignored in ps backend (which does not >>> support alpha). I think it is bette

Re: [Matplotlib-users] bug in ContourSet and additional kwargs

2010-04-28 Thread Eric Firing
Matthias Michler wrote: [...] First of all I think my previously described error in the over-color is due to a bug in the set up of the colors.ListedColormap during the initialisation of ContourSet if 'self.colors' is not None. For the number of entries in the map 'N' the number of layers is pa

Re: [Matplotlib-users] bug in ContourSet and additional kwargs

2010-04-27 Thread Eric Firing
Matthias Michler wrote: > Hello list, Hi Eric, > > I stumbled upon the old thread "ploting matrix data" and the changes in my > mpl-svn working copy allowing to provide under_color and over_color as a > keyword argument of contourf. > > On Tuesday 14 April

Re: [Matplotlib-users] Transparent figures no longer working

2010-04-26 Thread Eric Firing
Jae-Joon Lee wrote: > Looking at the code, the "transparent" option set alphas of paches to > 0, which I think is simply ignored in ps backend (which does not > support alpha). I think it is better if the visibility of patches is > set to False when the "transparent" option is set. The ps backend

Re: [Matplotlib-users] Incomplete rendering of line plot

2010-04-23 Thread Eric Firing
Tom Aldcroft wrote: > I've run into a case where the rendering in a line plot is incomplete > and some lines are not drawn at all. Basically I have a dataset (see > below) where I know two points go to a value of zero. When I plot > the points and do interactive pan/zoom sometimes the line going

Re: [Matplotlib-users] Is there an easy way to plot a log-frequency spectrogram?

2010-04-19 Thread Eric Firing
Friedrich Romstedt wrote: > 2010/4/19 Eric Firing : >> David Ho wrote: >>> Just as an illustration, I'm looking for a nice way to plot something >>> like this: >>> http://labrosa.ee.columbia.edu/matlab/sgram/ >>> >>> I don't necessa

Re: [Matplotlib-users] Is there an easy way to plot a log-frequency spectrogram?

2010-04-19 Thread Eric Firing
David Ho wrote: > Just as an illustration, I'm looking for a nice way to plot something > like this: > http://labrosa.ee.columbia.edu/matlab/sgram/ > > I don't necessarily need a weighting matrix to convert the Pxx array, > which is what Dan Ellis' code does; I just need to visualize the > spec

Re: [Matplotlib-users] Issue with PatchCollection

2010-04-15 Thread Eric Firing
Thomas Robitaille wrote: > Hi, > > Last year, I submitted a bug report regarding the fact that PatchCollection's > match_original argument does not work properly, in a pretty simple script: > > https://sourceforge.net/tracker/?func=detail&aid=2881485&group_id=80706&atid=560720 > > I came across

Re: [Matplotlib-users] Issue with PatchCollection

2010-04-15 Thread Eric Firing
Thomas Robitaille wrote: > Hi, > > Last year, I submitted a bug report regarding the fact that PatchCollection's > match_original argument does not work properly, in a pretty simple script: > > https://sourceforge.net/tracker/?func=detail&aid=2881485&group_id=80706&atid=560720 > > I came across

Re: [Matplotlib-users] matplotlib colors vs html colors

2010-04-14 Thread Eric Firing
John Hunter wrote: > On Wed, Apr 14, 2010 at 2:14 PM, Jae-Joon Lee wrote: > >> John, the relevant code to define the "colors" attribute seems to be >> written by you. Maybe this is some matlab convention? Can you comment >> on this? > > The original color letters did come from matlab, and some o

Re: [Matplotlib-users] Postscript backend produces different file permission than png backend?

2010-04-13 Thread Eric Firing
Drain, Theodore R (343P) wrote: > On Linux: > > import pylab as p > p.plot( [1,2,3] ) > p.savefig( 'test.ps' ) > p.savefig( 'test.png' ) > > ls -l test.* > -rw-r--r-- 1 --- - 17236 Apr 13 10:32 test.png > -rw--- 1 --- - 8640 Apr 13 10:32 test.ps > > This is with a umask of 022. I

Re: [Matplotlib-users] contourf creats white-like lines (or gaps) between each two color patches

2010-04-11 Thread Eric Firing
lmkli wrote: >> What version of mpl are you using? > My mpl version is 0.99.1 > >> Are you modifying the default anti-aliasing in the patch collections that >> contour is creating? > Could you please tell me how to this? I am very new to matplotlib, thank you > very much if you can give me some

Re: [Matplotlib-users] speed up imports?

2010-04-05 Thread Eric Firing
Michael Droettboom wrote: > All of those calls to "open" are being generated from the pytz import -- > which is why pytz seems like the likely candidate. Is it possible you > have pytz installed as a compressed egg, or on a remote disk, or > something that may be causing a file reading penalty?

Re: [Matplotlib-users] speed up imports?

2010-04-02 Thread Eric Firing
Andrew Kelly wrote: > import pytz only took 0.0 seconds. > Sounds like it was already imported, so you were not really timing that import. On linux (ubuntu 9.10, Lenovo T60 laptop) importing pytz takes longer than importing numpy: efir...@manini:~$ time python -c "import pytz" real0m0.

Re: [Matplotlib-users] Cmap creation

2010-04-02 Thread Eric Firing
Bruce Ford wrote: > Below is the example script (sorry!). I've tried all three methods of > establishing a colormap to no avail. The most promising looked like > option 2, but that gave me the "AttributeError: 'module' object has no > attribute 'register_cmap'" error. > > I'm getting this error

Re: [Matplotlib-users] speed up imports?

2010-04-01 Thread Eric Firing
Andrew Kelly wrote: > Has anyone had any success in speeding up the mpl imports? > > "import matplotlib.pyplot as plt" > ( or "from matplotlib.figure import Figure") > > takes 6 full seconds to load. That seems excessive. Any ideas? > > -Andy Andy, A couple replies came back directly to me

Re: [Matplotlib-users] speed up imports?

2010-04-01 Thread Eric Firing
Andrew Kelly wrote: > Has anyone had any success in speeding up the mpl imports? > > "import matplotlib.pyplot as plt" > ( or "from matplotlib.figure import Figure") > > takes 6 full seconds to load. That seems excessive. Any ideas? Unless you have a very old machine, it sounds like something

Re: [Matplotlib-users] Animated quiver

2010-04-01 Thread Eric Firing
Fiocco Davide wrote: > Dear all, > > I'm trying to plot a 2D vector field. It's a function of time so I would like > to display an animation. > For single frames I used quiver and I'm happy with it... is there any way to > update a quiver with time? > If the vectors will always be at the same

Re: [Matplotlib-users] Copying collections over to a new figure

2010-03-30 Thread Eric Firing
Jae-Joon Lee wrote: > Doing this in a general way is quite difficult (if possible) because a > user can set an arbitrary transform for an artist. What we may try to > do is recycling artists whose transform is simple, e.g., transData, > rather than try to come up with a general solution. Is even t

Re: [Matplotlib-users] Is scatter method's linestyles keyword argument being ignored (in SVN)?

2010-03-29 Thread Eric Firing
Sami-Matias Niemi wrote: > Hi, > > When using scatter plotting method and linestyles argument the output > seems to ignore the linestyles keyword value at least in SVN. Can > someone confirm this or did I misunderstood the functionality? Yes, scatter is designed to plot markers only, and it d

Re: [Matplotlib-users] colorbar.Colorbar ticking

2010-03-29 Thread Eric Firing
Friedrich Romstedt wrote: > 2010/3/29 Eric Firing : >> It already has this. You can pass in a custom locator or set of tick >> locations via the "ticks" kwarg, but if you don't, a locator is chosen >> automatically. Except in special cases, this will be a

Re: [Matplotlib-users] strange behavior using a mask with Basemap

2010-03-28 Thread Eric Firing
Yeates, Mathew C (388D) wrote: > Hi > > I would expect > > hgt=ma.masked_where(div == 0,hgt) > > m.contourf(x,y,hgt,15,cmap=plt.cm.jet) > > > > to produce a map complementary to the map produced by > > > > hgt=ma.masked_where(div != 0,hgt) > > m.contourf(x,y,hgt,15,cmap=plt.cm.jet) > >

Re: [Matplotlib-users] contourf creats white-like lines (or gaps) between each two color patches

2010-03-25 Thread Eric Firing
lmkli wrote: > Thank you! > > I just thought there must be a solution. > I saw someone posted he can modified contour.py to fix this, but I failed. > :( > What version of mpl are you using? Are you modifying the default anti-aliasing in the patch collections that contour is creating? Are you

Re: [Matplotlib-users] AssertionError without further description

2010-03-21 Thread Eric Firing
Ryan May wrote: > On Sun, Mar 21, 2010 at 12:23 PM, Martin Bothe wrote: >> Hey Ryan, >> thanks for your answer. >> Ashamed I have to realize that the example works for me as well. >> When I tried it the first time, I had no pc featuring both internet and a >> matplotlib installation, so I had to c

Re: [Matplotlib-users] color kwarg of hist

2010-03-15 Thread Eric Firing
John Didion wrote: > The documentation for hist says that the color kwarg can take a sequence > of rgba tuples. However, anytime I pass a sequence I get: That is an error in the docstring; it can take only a single color, which will be applied to both the edge and the fill. Eric > > > Traceba

Re: [Matplotlib-users] figure: underlying C/C++ object has been deleted

2010-03-15 Thread Eric Firing
tomislav_ma...@gmx.com wrote: [...] > > Here is the code with the error: > > > http://pastebin.com/3QUws70n > > > > I don't understand, why would a figure object get deleted after it's > shown on the screen? What am I doing wrong? This is a common "gotcha": don't use pyplot.show() anywhere

Re: [Matplotlib-users] Contour Plotting of Varied Data on a Shape

2010-03-15 Thread Eric Firing
Ian Thomas wrote: > Chris Barker wrote: >> I think it would be great to have in MPL. >> >> What code are you using for the triangulation? Does it do constrained >> delauney? > > My code only does the contouring; you have to input the triangulation. > In the examples included with the code I used

Re: [Matplotlib-users] Contour with locator=FixedLocator(...) drops first and last contours from the list.

2010-03-13 Thread Eric Firing
David Smith wrote: > This is a bug report. > > I am using matplotlib 0.99.1 on Windows. When using contour with the > keyword > argument locator=ticker.FixedLocator(levels), the plot is always > dropping the first > and last contour level. If there are less than 3 levels, contour.py > throws

Re: [Matplotlib-users] Agg complexity exceeded

2010-03-12 Thread Eric Firing
John Hunter wrote: > On Fri, Mar 12, 2010 at 8:30 AM, Tornes, Ivan E wrote: >> I’m working on a project that handles large data sets. Up to this point I >> had not had any issues using matplotlib, but I tried yesterday to have it >> plot a file that had 8 million float,float pairs in it and dies

Re: [Matplotlib-users] Bug: string.letters

2010-03-09 Thread Eric Firing
Eric Firing wrote: > Tony S Yu wrote: >> On Mar 9, 2010, at 1:22 PM, John Hunter wrote: >> >>> On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing wrote: >>> >>>> Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from >>>> svn.

Re: [Matplotlib-users] Bug: string.letters

2010-03-09 Thread Eric Firing
Tony S Yu wrote: > On Mar 9, 2010, at 1:22 PM, John Hunter wrote: > >> On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing wrote: >> >>> Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from >>> svn. I have done a little grepping and other explora

Re: [Matplotlib-users] Bug: string.letters

2010-03-09 Thread Eric Firing
John Hunter wrote: > On Tue, Mar 9, 2010 at 12:16 PM, Eric Firing wrote: > >> Bizarre! I can reproduce it with python 2.6 (ubuntu 9.10) and mpl from >> svn. I have done a little grepping and other exploration, but have >> completely failed to find where

Re: [Matplotlib-users] Bug: string.letters

2010-03-09 Thread Eric Firing
Enssle Carl Philipp wrote: > Hallo. > > When importing string in python, "letters" are defined as follows: > > >>> import string > >>> string.letters > 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' > > … whereas when importing matplotlib, the order of "letters" seems to be > changed:

Re: [Matplotlib-users] contourf doesn't like a rectangular grid

2010-03-07 Thread Eric Firing
Shrividya Ravi wrote: > Hi all, > I have been using contourf quite happily with a square number of grid > points. e.g. a 20 by 20 grid. I recently decided to do a contourf plot > of a 20 by 15 grid (300 points) and I get errors. Unfortunately, I am > plotting experimental data so I cannot really

Re: [Matplotlib-users] Traits

2010-03-05 Thread Eric Firing
David Arnold wrote: > All, > > In one post from John Hunter, I heard the word "traits", which I assume is > from the enthought distribution. > > Is there a move in matplotlib toward the "trait" technology taking place? How > about for Python in general? > No to both, as far as I know. Every

Re: [Matplotlib-users] mplot3d stays?

2010-02-25 Thread Eric Firing
John Hunter wrote: [...] > > It looks like we have enough 3D projects to justify a google summer of > code student. Would those of you with an interest in mplot3d and some > knowledge of the internals be interested in helping mentor a student? > http://www.mail-archive.com/matplotlib-de...@l

Re: [Matplotlib-users] Show pixelated image using imshow

2010-02-25 Thread Eric Firing
Sebastian Rhode wrote: > Hi, > > I would like to show an image using the imshow function. Thsi is quite > trivial, but what I acn not figure out so far, is how to display the > image without any interpolation. For my application it is useful to > really see the individaul pixel and the borders

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 sho

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

2010-02-22 Thread Eric Firing
John Hunter wrote: > On Mon, Feb 22, 2010 at 4:33 PM, John Hunter wrote: >> polycol = plt.hexbin(data['jetMomentum'][cut] / 1000, >> data['deltaR'][cut],gridsize=50, norm=colors.LogNorm()) >> cb = plt.colorbar(norm=colors.LogNorm()) >> >> but this appears to be broken: > > I committed some chan

Re: [Matplotlib-users] plot(x,y) Trouble?

2010-02-21 Thread Eric Firing
John Hunter wrote: > On Sun, Feb 21, 2010 at 9:52 AM, Andrea Gavana > wrote: >> On 21 February 2010 15:44, Alan G Isaac wrote: >>> On 2/21/2010 10:29 AM, Wayne Watson wrote: plot(2.8,3.4) doesn't work in my program >>> Why should it? >> I believe it should. > > It does in svn -- thoug

Re: [Matplotlib-users] plot(x,y) Trouble?

2010-02-21 Thread Eric Firing
Alan G Isaac wrote: > On 2/21/2010 10:29 AM, Wayne Watson wrote: >> plot(2.8,3.4) doesn't work in my program >> > > Why should it? > Plot takes once or two *sequences* of numbers as arguments. In more recent versions than the OP has, it can also handle plot(2.8, 3.4, 'o') With a single point

Re: [Matplotlib-users] Problem with plotting fast spiking data

2010-02-18 Thread Eric Firing
Jakub Nowacki wrote: > Hi, > > I work with neural models and I have problem with plotting fast spiking data. > The spikes on the plot appear to have different hight which changes when I > for example resize the plot window. The same problem is with saving data into > files, especially in vector

Re: [Matplotlib-users] semilogx does no longer handle 0.0 correctly?

2010-02-18 Thread Eric Firing
Danny Handoko wrote: > Dear matplotlib community, > > We recently did an upgrade to matplotlib 0.99.0 from 0.91.2. > We noticed that some semilog graphic we previously created are suddenly > no longer visible. After some searching we found out that when the x > data contains a 0.0 value and we

Re: [Matplotlib-users] Masks

2010-02-18 Thread Eric Firing
David Arnold wrote: > All, > > In the code on: > > http://matplotlib.sourceforge.net/examples/api/bbox_intersect.html > > I think I've figured out that: > > vertices = (np.random.random((4, 2))-0.5)*6.0 > vertices = np.ma.masked_array(vertices, [[False, False], [True, True], > [False,

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

2010-02-17 Thread Eric Firing
Jan Strube wrote: > Dear matplotters, > encouraged from the excellent response times to my last problem, I am > trying to explore more features of matplotlib. > > My current problem is with hexbin. > I have been using numpy.histogram2d and imshow so far for 2d histograms, > but I must admit that

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-15 Thread Eric Firing
Tim Michelsen wrote: > Hello, > I have a similar problem to: >> Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark >> (1,1.5) with a green circle. How is that done? > Your problem is not similar to the above; the problem above is solved with a simple call to "plot". > I a

Re: [Matplotlib-users] Placing a marker at specific places where lines join?

2010-02-14 Thread Eric Firing
Wayne Watson wrote: > Thank you for the code below. Yes, it actually does what I want it to > do. The difference in what I did similarly yesterday (see my response to > Philipp moments ago) is the [ ], a list. All this for one simple bit of > list notation. Newer versions of mpl do not requir

Re: [Matplotlib-users] 16bit tiff support?

2010-02-12 Thread Eric Firing
Philipp Lies wrote: > Hi, > > is there a backend that supports 16bit tiff images? Can you just use png, and use the netpbm utilities or ImageMagick convert program to go to and from tiff? Eric > According to the website GDK supports tiff but that's wrong: > > >>>import matplotlib > >>>matpl

Re: [Matplotlib-users] Runtime Error - Need Advice

2010-02-09 Thread Eric Firing
I know nothing about PythonWin. My suspicion is that this is a problem of dueling event loops, and one solution would be to use ipython instead of pythonwin. (Note that you typically need to use "reply to all" on this list, otherwise the reply does not get copied to the list.) Eric

Re: [Matplotlib-users] Runtime Error - Need Advice

2010-02-09 Thread Eric Firing
Lee Boger wrote: > > Windows XP Professional with Python 2.5 installed (pywin32 build 210) - > came with dSPACE software package > > Downloaded and installed matplotlib-0.99.1.win32-py2.5.exe from > sourceforge.net > > Downloaded and installed numpy-1.4.0-win32-superpack-python2.5.exe from >

Re: [Matplotlib-users] quiver + dates

2010-02-07 Thread Eric Firing
Filipe Pires Alvarenga Fernandes wrote: > Hello list, > > I'm trying to create a stick-plot figure using the quiver function from > matplotlib. However, I'm failing miserably to plot dates in the x-axis. > Has anyone done this before? Also, is there an effort to create a > stickplot function?

Re: [Matplotlib-users] Comet

2010-02-06 Thread Eric Firing
David Arnold wrote: > All, > > I am still wondering why there is no comet command in matplotlib. > > I was successful with the following: > > import matplotlib.pyplot as plt > import numpy as np > > len=200 > t=np.linspace(0,2*np.pi,len) > x=np.cos(t) > y=np.sin(t) > xd=[x[0]] > yd=[y[0]] > l,

Re: [Matplotlib-users] canvas.print_figure printing a variable amount of my figure

2010-02-05 Thread Eric Firing
David Goldsmith wrote: > On Mon, Oct 6, 2008 at 10:56 AM, Eric Firing <mailto:efir...@hawaii.edu>> wrote: > > Christopher Barker wrote: > > David Goldsmith wrote: > > I feel like I must be missing something > > > yu

Re: [Matplotlib-users] Difference Between Scatter and Plot? (Zig-Zag)

2010-02-04 Thread Eric Firing
Wayne Watson wrote: > Simply explained what I'm looking for is a way to draw a zig-zag path > indicating a path taken by a particle. Maybe this is best done with some > tools outside of the normal plot capabilities? Why doesn't plot handle this? What do you see as missing? > > On 2/4/2010 9:02

Re: [Matplotlib-users] contourf() color mapping

2010-02-02 Thread Eric Firing
James Conners wrote: > Hi, > > I'm having some trouble producing a filled contour how I want it. > > Say I'm plotting data over the range [1.2, 20] using 15 level lines evenly > spaced > over that interval. I'd like the min of that interval to map to the min of > the color spectrum (say "jet"

Re: [Matplotlib-users] Size of ellipses in EllipseCollection

2010-02-02 Thread Eric Firing
Yannick Copin wrote: > Eric Firing wrote: >> Maybe I am misunderstanding, but the EllipseCollection in the example >> is panning and zooming as I expect. The shapes and orientations are >> staying the same while the scale expands and contracts with the x-axis. >>

Re: [Matplotlib-users] Is there a "transparent" color, for overlaying contouf regions?

2010-02-01 Thread Eric Firing
Sourav K. Mandal wrote: > Hello, > > (This is a different question for the same project that led me to file a > bug about alpha blending in "contour" .) > > I want to overlay a number of exclusion regions in a 2D parameter scan. > I generate each region with contourf in succession, like: > >

Re: [Matplotlib-users] Size of ellipses in EllipseCollection

2010-02-01 Thread Eric Firing
Yannick Copin wrote: > Hi, > > I would like to plot lots of error ellipses on my plot. I thought I > could use an EllipseCollection to do so, but I didn't manage to get the > ellipse sizes, expressed in data units, right (see test script attached). > > When using a plain list of Ellipse's, ever

Re: [Matplotlib-users] using subscripts and tex in labels

2010-01-31 Thread Eric Firing
per freem wrote: > hi all, > > two quick questions about labels. first, is there a way to make > subscripts/superscripts *without* using TeX in labels? For example, I > use helvetica in all my labels and I want to plot something like: > plt.xlabel("log10") where "10" is a subscript of "log", but w

Re: [Matplotlib-users] Problem formatting a 'step' histogram with a log scale and empty bins.

2010-01-31 Thread Eric Firing
b9o2jnbm tsd71eam wrote: > Hi! > > I want to create a histogram with the step scale and I am finding > an inconstancy when using a log scale. I have a very simple example > without a log scale which works just as expected creating alternating > bins with value one and value zero. > > from pyla

Re: [Matplotlib-users] Setting dash size and gap of dashed line in matplotlib

2010-01-30 Thread Eric Firing
per freem wrote: > hi all, > > I am plotting certain dashed lines in matplotlib, using: > > plt.plot(x, y, '--') > > I'd like to set the dash size (i.e. length of each dash) and the gap > between the dashes of the plotted line. Is there a way to set this > from matplotlib? plt.plot([0,1], [2,3]

Re: [Matplotlib-users] Problem using TeX

2010-01-29 Thread Eric Firing
Florian Lindner wrote: > Hello, > > I try to use LaTeX in my plot. I follow the instructions from > http://www.scipy.org/Cookbook/Matplotlib/UsingTex > > flor...@horus:~> cat .matplotlib/matplotlibrc > text.usetex: true > > My plotting code looks like: > > Ma = arange(1.0, 5.0, 0.01) >

Re: [Matplotlib-users] conourf() subplots with a single colorbar

2010-01-28 Thread Eric Firing
Sharaf Al-Sharif wrote: > Hi, > I'm trying to make a figure with a column of contourf() subplots using > matplotlib.pyplot. The contour plots have the same levels and I only > need one color bar. The problem is that I'm not sure how to place the > color bar in the figure without messing up the a

Re: [Matplotlib-users] Possible bug with contour, alpha blending and vector output

2010-01-28 Thread Eric Firing
Sourav K. Mandal wrote: > Hello, > > I am using Matplotlib version 0.99.1.1. > > I have a simple problem: when outputting to PDF or SVG, alpha blending > does not work for the lines drawn by "contour". However, alpha blending > does work for the regions given by "contourf". > You are right,

Re: [Matplotlib-users] Plots dates on contour plot

2010-01-22 Thread Eric Firing
Filipe Pires Alvarenga Fernandes wrote: > Dear matplotlib users, > > I've been successful to plot 2-D lines with dates in the x-axis directly > like: > > > plot(time,dens[1,:]) > > Where times starts at 1998-01-11 01:00:00 and ends at 1998-02-06 > 08:00:00 (633 elements). and dens has 10 elem

Re: [Matplotlib-users] Transparent plot symbols

2010-01-22 Thread Eric Firing
C M wrote: > On Fri, Jan 22, 2010 at 2:34 PM, Michael Cohen wrote: >> Hi all, >> I am making a plot with circle symbols, so I have 'o' in the plot() command. >> How do I make those circles transparent? I'd like the center of the >> circles to allow the catter plot underneath the circle location t

Re: [Matplotlib-users] modifying colorbar ticklabels

2010-01-21 Thread Eric Firing
Jae-Joon Lee wrote: > On Wed, Jan 20, 2010 at 2:04 PM, Eric Firing wrote: >> The reason for this fudge in contour is that contourf fills >> lower < z <= upper >> for each consecutive pair of contour levels. >> When the minimum value of z coincides with the lowest

Re: [Matplotlib-users] modifying colorbar ticklabels

2010-01-20 Thread Eric Firing
Jae-Joon Lee wrote: > On Wed, Jan 20, 2010 at 12:12 PM, Mario Mech wrote: >> the smallest value (0.0) is labeled with "-0.0". I just want to get rid of >> the minus sign. >> > > This is because the actual value is "-9.e-06" (this inherits > from the levels of contour). The reason for th

Re: [Matplotlib-users] modifying colorbar ticklabels

2010-01-20 Thread Eric Firing
Jae-Joon Lee wrote: > On Wed, Jan 20, 2010 at 12:12 PM, Mario Mech wrote: >> the smallest value (0.0) is labeled with "-0.0". I just want to get rid of >> the minus sign. >> > > This is because the actual value is "-9.e-06" (this inherits > from the levels of contour). > While I think we

Re: [Matplotlib-users] contour plots with logarithmic axes

2010-01-11 Thread Eric Firing
Jae-Joon Lee wrote: > Contour will work as expected if the axes is in log scale. See below. > > z = np.arange(100).reshape((10,10)) > x = np.logspace(0, 4, 10) > y = np.logspace(0, 4, 10) > > ax1 = subplot(121) > ax1.contour(np.log10(x), np.log10(y), z) > > ax2 = subplot(122) > ax2.set_xscale("l

Re: [Matplotlib-users] define color cycle in matplotlibrc

2010-01-05 Thread Eric Firing
Dominik Szczerba wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Eric Firing wrote: >> Dominik Szczerba wrote: >> OK I started hacking and added a color_cycle property to matplotlibrc. >> Would you be so kind to add this fix to the official version?

Re: [Matplotlib-users] Colorbar embedding in qt4

2010-01-03 Thread Eric Firing
Alexander Hupfer wrote: > Thanks I got it fixed. > This leads to the follow up question: > What is the right way to keep an application responsive while the graph > is drawn? > Drawing a scatter plot with 300 points seems to take a while. I guess I That's strange--a scatter plot with 1000 points

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread Eric Firing
ire some additional fiddling. I would recommend > allowing the user to select units of points, pixels, mm, inches, or plot > units, with a default of points. Much easier said than done, unfortunately. Not impossible. Who's going to bell the cat? Eric > > Phillip >

Re: [Matplotlib-users] query about pyplot.text example

2010-01-03 Thread Eric Firing
John Hunter wrote: > On Sun, Jan 3, 2010 at 10:22 AM, Ryan May wrote: >>> the marker. It would be great if one could specify the text offsets in >>> units of the font size rather than in units of map distance. >> You can do it, it just takes a bit of knowledge about how different >> transformatio

Re: [Matplotlib-users] query about pyplot.text example

2010-01-02 Thread Eric Firing
Dr. Phillip M. Feldman wrote: > The online documentation at URL= > http://www.scipy.org/Cookbook/Matplotlib/Maps has an example that uses > plt.text as follows: > > plt.text(xpt+5,ypt+5,name) > > Why is the offset 5? The proj library used by Basemap transforms lon, lat to meters, so

Re: [Matplotlib-users] eps/pdf/svg contourf contours don't overlap properly with high resolution data

2010-01-01 Thread Eric Firing
Jouni K. Seppänen wrote: > Jordan Dawe writes: > >> Contourf plots that I output in vector format files have little >> triangular glitches at the contour boundaries if the contoured array >> is larger than about 200x200. The same files in png format are >> perfect, even at very high dpi values. >

Re: [Matplotlib-users] define color cycle in matplotlibrc

2009-12-29 Thread Eric Firing
Dominik Szczerba wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > OK I started hacking and added a color_cycle property to matplotlibrc. > Would you be so kind to add this fix to the official version? Thanks! > Dominik Your basic idea--that the colorcycle should be settable in rcPara

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Jae-Joon Lee wrote: > On Sun, Dec 27, 2009 at 7:31 PM, Eric Firing wrote: >> I don't understand what your script, below, is intended to do or show. I >> haven't run it with mpl prior to my change. With the change, it simply >> draws a single line, or at leas

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Eric Firing wrote: >> I went ahead and committed (svn rev 8054) changes that I think address >> the problem, and that should slightly improve speed as well in some >> cases, without slowing anything down in other reasonable cases--unless >> there are subtleties I am

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
> > I went ahead and committed (svn rev 8054) changes that I think address > the problem, and that should slightly improve speed as well in some > cases, without slowing anything down in other reasonable cases--unless > there are subtleties I am missing. Or maybe I am missing something > bla

Re: [Matplotlib-users] [PyQt] Plotting resets autoscale_on to true

2009-12-27 Thread Eric Firing
Till Stensitzki wrote: > Hello, > i am using a Matplotlib figure as widget, in a PyQt4 programm. > Everything works, except "set_autoscale_on(False)". > Everytime i call a figure axes to plot something, it forgets its > autoscale status. Here some code, with axs a subplot of a figure: > > |

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Jae-Joon Lee wrote: > On Sun, Dec 27, 2009 at 2:37 PM, Eric Firing wrote: >> What are the circumstances under which one would call set_data() and not >> want or need an update? > > If you ask me, I'm +1 to update the plot always. But, apparently, the > original aut

Re: [Matplotlib-users] Line update: set_data vs recache issue

2009-12-27 Thread Eric Firing
Jae-Joon Lee wrote: > I just filed a bug related with this. > > https://sourceforge.net/tracker/?func=detail&aid=2917758&group_id=80706&atid=560720 > > > I think the possible solution could be > > 1) we keep the copied version of the input data as a cache, and > provide a api to access the cac

Re: [Matplotlib-users] suptitle interfering with figure

2009-12-16 Thread Eric Firing
Bruce Ford wrote: > Using the code below, I'm placing a second title on a figure. However > this title is placed over the figure and does not adjust the figure > placement for the title. Is there a way to adjust the placement of > the figure further down? I'm not seeing any such setting. > >

Re: [Matplotlib-users] Histogram without probability

2009-12-14 Thread Eric Firing
nbv4 wrote: > The histogram example in the matpolotlib gallery is just what I want, except > instead of "probility" shown on the Y-axis, I want the number of items that > fall into each bin to be plotted. How do I do this? Here is my code: > > import numpy as np > import matplotlib

Re: [Matplotlib-users] clear

2009-12-11 Thread Eric Firing
David Arnold wrote: > All, > > In Matlab, if I want to clear my working space of variables, I type: > > >> clear all > > How do I do the same thing in Ipython? I think the magic "%reset" is the closest. Eric -- Retur

Re: [Matplotlib-users] mark invalid pixels in image

2009-12-10 Thread Eric Firing
markus.proel...@ifm.com wrote: > > Hello, > > let's say I have given an image of distance values, which I display with > the jet colormap. Now if there are invalid pixels within the image they > have the value -1 or -2. Is there a way to display just the "valid" > image with the jet colorbar a

Re: [Matplotlib-users] scientific notation \times symbol

2009-12-07 Thread Eric Firing
Hao Wen wrote: > Hi there: > > I tried to plot large numbers and scientific notation has to be used. > But instead of "\times" symbol, it used "e", which cannot be accepted as > publishable. Anyone know how to deal with that? Add a kwarg to your formatter initialization. See below. Eric > > M

Re: [Matplotlib-users] quiver question

2009-11-30 Thread Eric Firing
Alan G Isaac wrote: > On 11/29/2009 11:44 PM, Eric Firing wrote: >> in svn there is such an option, but it still doesn't seem to >> do exactly the right thing in this case > > OK, looking forward ... Try svn 7993 with "scale_units='xy', angles='

Re: [Matplotlib-users] Object Module is not callable, traceback

2009-11-29 Thread Eric Firing
Wayne Watson wrote: > Eric Firing wrote: >>> >>> I'm pretty new to this stuff, so what belongs where is sometimes >>> unclear. I'll check out the sourceforge tip. I didn't write the >>> program. I'm just trying to add some features. Chan

Re: [Matplotlib-users] Object Module is not callable, traceback

2009-11-29 Thread Eric Firing
Wayne Watson wrote: > > Eric Firing wrote: >> Wayne Watson wrote: >>> I have a fairly large program that uses pylab and company. I want to >>> use the matplot histogram function. Here are the declarations at the >>> start. I added import matplotlib as mpl

Re: [Matplotlib-users] Object Module is not callable, traceback

2009-11-29 Thread Eric Firing
Wayne Watson wrote: > I have a fairly large program that uses pylab and company. I want to use > the matplot histogram function. Here are the declarations at the start. > I added import matplotlib as mpl > -start > from Tkinter import * > from numpy import * > import numpy > i

Re: [Matplotlib-users] quiver question

2009-11-29 Thread Eric Firing
Alan G Isaac wrote: > On 11/29/2009 12:10 PM, Eric Firing wrote: >> quiver(x[:-1], y[:-1], u, v, angles='xy', units='x', scale=1) >> > > That works perfectly when there is change only in x, > but not when both coordinates change. It seems like >

Re: [Matplotlib-users] quiver question

2009-11-29 Thread Eric Firing
Alan G Isaac wrote: > I have a collection of 2d points xy. > Instead of simply plotting the points, > I'd like to plot a collection of arrows > that goes from each point to the next. > The "from" is easy of course; > the "to" is the problem. > > I think I should be able to use quiver, > but I'm no

<    2   3   4   5   6   7   8   9   10   11   >