[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] 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] Looping through all the built-in colormaps

2010-02-24 Thread Friedrich Romstedt
-- From: Friedrich Romstedt friedrichromst...@gmail.com Date: 2010/2/24 Subject: Re: [Matplotlib-users] Looping through all the built-in colormaps To: David Goldsmith d_l_goldsm...@yahoo.com 0) is there some elegant way to do what I want to do? Don't know whether it's elegant

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

2010-02-24 Thread Friedrich Romstedt
under GPL incorporating MIT licensed software? Otherwise I would release under dual license. Friedrich 2010/2/24 Alan G Isaac alan.is...@gmail.com: On 2/24/2010 2:36 AM, Friedrich Romstedt wrote:  Can you explain to me why you are so restrictive about GPLed code?  I  mean, it's all OSS

Re: [Matplotlib-users] mplot3d stays?

2010-02-25 Thread Friedrich Romstedt
I have worked in highschool on a project Beam tracing where I had to subdivide triangles from a certain point of view with z-ordering and with such a subdivision how they are covered by the viewing beam. This means this engine you want to write already exists. See the following ascii graphics:

Re: [Matplotlib-users] Basemap interp

2010-02-25 Thread Friedrich Romstedt
Andrew, I sent this to you personally, unintentionally, and want it to be on the list too. So you have it doubled now, sorry. 2010/2/25 Andrew Charles ac1...@gmail.com: I'm trying to interpolate from one grid to another using Basemap's interp function. It seems to want the lat and lon axis of

Re: [Matplotlib-users] mplot3d stays?

2010-02-25 Thread Friedrich Romstedt
2010/2/25 John Hunter jdh2...@gmail.com: We rely on plenty of C++ code so this isn't a problem for us. We would have to write an interface layer but it shouldn't be too difficult. The harder problem may be dealing tracking the interior vs the edges of the mesh, but certainly not

Re: [Matplotlib-users] mplot3d stays?

2010-02-25 Thread Friedrich Romstedt
2010/2/25 Eric Firing efir...@hawaii.edu: Is it time for some re-thinking of the approach to 3-D?  I am a bystander, but I have the uneasy sense that trying to turn mplot3d into a first-class 3-D plotting tool may be a misapplication of effort. Might the effort be more productive if applied to

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

2010-02-25 Thread Friedrich Romstedt
Ok, it's rereleased now under MIT, github.com/friedrichromstedt/diagram_cl . I'm having somewhat trouble accessing my web server at the moment, so please find it on github. The docu on www.friedrichromstedt.org (see github link) is a bit outdated, but only with respect to the double-right click

Re: [Matplotlib-users] Basemap interp

2010-02-25 Thread Friedrich Romstedt
2010/2/26 Andrew Charles ac1...@gmail.com: Aye, now that I read the docstring with a rested pair of eyes it's clear that xout and yout are meshgrids (rank 2 arrays). Thanks, problem solved. For convenience, I recently heard about numpy.meshgrid, which does the job for you. See its __doc__,

Re: [Matplotlib-users] mplot3d stays?

2010-02-26 Thread Friedrich Romstedt
2010/2/26 Gael Varoquaux gael.varoqu...@normalesup.org: What Eric was most probably talking about is the newer versions of Mayavi, that we tend to call 'mayavi2', even though we are now up to version 3, in particular the mlab interface:

Re: [Matplotlib-users] mplot3d stays?

2010-02-26 Thread Friedrich Romstedt
I also agree with Reinier.  I want my 3d plots to look as close as possible to my 2d plots.  Because mplot3d uses so much of the same matplotlib core, this is trivial.  As Friedrich mentioned, the mplot3d code is actually pretty small.  To me, that is a great feature.   I found the mplot3d

Re: [Matplotlib-users] mplot3d stays?

2010-02-27 Thread Friedrich Romstedt
http://www.friedrichromstedt.org/python/pyclip/a01.Zerteilung.pdf (It's unfortunately in german, but the graphics are self-explaining) A school mate working together with me on the project has worked that out. H = number of corners of the front triangle lying inside of the back triangle V =

Re: [Matplotlib-users] The time is: ....

2010-02-28 Thread Friedrich Romstedt
2010/2/26 jamgood96 jamgoo...@gmail.com: Each time I try to run a script, it just keeps printing, The time is: The time is: Fri Feb 26 13:27:08 2010. over and over. I believe I installed all the packages correctly, but honesty was a bit overwhelmed. I've tried attaching a screen shot of what

Re: [Matplotlib-users] imshow size limitations?

2010-03-01 Thread Friedrich Romstedt
2010/2/27 David Goldsmith d_l_goldsm...@yahoo.com: ax.imshow(image[0:ny/2+1, 0:nx/2+1]) # upper left corner of image     ax.imshow(argW[ny/2+1:-1, 0:nx/2+1]) # lower left corner of image     ax.imshow(argW[0:ny/2+1, nx/2+1:-1]) # upper right corner of image     ax.imshow(argW[ny/2+1:-1,

Re: [Matplotlib-users] Importing pylab causes exception - any ideas?

2010-03-02 Thread Friedrich Romstedt
Bringing this to the list and not to Jon alone ... 2010/3/1 Jon Moore jonr_mo...@yahoo.co.uk: 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.

Re: [Matplotlib-users] Plotting boolean/logical data type

2010-03-04 Thread Friedrich Romstedt
Do you want something like the attached? I created it with my package that no-one wants :-( import diagram_cl import diagram_cl.kernels.tk import numpy import Tkinter d1 = diagram_cl.Diagram() series = (numpy.random.random(100) 0.5).astype(numpy.float) for idx in xrange(0, len(series)):

Re: [Matplotlib-users] Mysterious ValueError: zero-size array...

2010-03-05 Thread Friedrich Romstedt
2010/3/5 David Goldsmith d_l_goldsm...@yahoo.com: I think it's a bug in numpy.ma._extrema_operations.reduce (at least Pierre GM couldn't explain it away and instructed me to file a bug ticket on it over there, which I did; w/ your permission, I'll add your code to that ticket?) - at the

Re: [Matplotlib-users] Mysterious ValueError: zero-size array...

2010-03-06 Thread Friedrich Romstedt
2010/3/6 David Goldsmith d_l_goldsm...@yahoo.com: Yeah, my email client (yahoo!) showed your example submission email as being directly to me, not the list, so I assumed that you were sending it directly to me because you saw that I had cross-posted to the numpy list.  Anyway, I'm returning

Re: [Matplotlib-users] Mysterious ValueError: zero-size array...

2010-03-06 Thread Friedrich Romstedt
David Goldsmith: Ah, ok, not right now (perhaps later): for the purpose of adding your code to the numpy bug ticket, I think it's best if I use something a little more ubiquitous. ;-)  But it looks useful, so I'll probably grab it and try it out myself; is it pure python, i.e., should I be

Re: [Matplotlib-users] How do I use a grid geometry manager in a matplotlib tk backend

2010-03-11 Thread Friedrich Romstedt
2010/3/11 Kim Hansen slaun...@gmail.com: canvas.get_tk_widget().grid(row=0) canvas._tkcanvas.grid(row=1) I cannot reproduce your problem. Can you maybe provide a self-contained script to reproduce the behaviour? Here is mine: import Tkinter import matplotlib tk = Tkinter.Tk() import

[Matplotlib-users] Yet another Tk backend

2010-03-11 Thread Friedrich Romstedt
Hello, I just uploaded just another Tk backend for matplotlib. It can connect to any Figure instance, also with multiple Axes (although only one will be active for interactive zooming and panning). I hope the package is useful because of its special mouse usage. To pan, click right, hold, and

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

2010-03-11 Thread Friedrich Romstedt
I deem it useful if you would add a print map_XX.shape, map_YY.shape, y.shape . I'm suspicious about their shape. _check_xyz() accepts 2D X,Y-arrays only if their shape is equal to that of y (y in your case). Friedrich

Re: [Matplotlib-users] Fixing Figure Size

2010-03-11 Thread Friedrich Romstedt
I would suggest that you add the axes with: axes = figure.add_axes((left, bottom, width, height)) instead of .add_subplot(). I think you have too many subplots, it seems that the algorithm isn't designed for this. With .add_axes(), you can add more space. Note that you have then maybe to call

Re: [Matplotlib-users] Colormaps

2010-03-14 Thread Friedrich Romstedt
2010/3/14 David Arnold dwarnol...@suddenlink.net: All, I am having difficulty with a line on:  http://scipy.org/LoktaVolterraTutorial Here are the lines: values  = linspace(0.3, 0.9, 5) vcolors = p.cm.autumn_r(linspace(0.3, 1., len(values))) First of all, I can find no reference to

Re: [Matplotlib-users] installling on ubuntu

2010-03-16 Thread Friedrich Romstedt
For the Windows machine, if you installed with the superpack, you should find an deinstaller in the Python directory called Removematplotlib.exe, I *guess* it only removes in fact the matplotlib package. You can also safely rename (or delete) the old matplotlib directory and the mpl_toolkits

Re: [Matplotlib-users] figure: centering data and plot.svg borders

2010-03-17 Thread Friedrich Romstedt
Maybe: from matplotlib import pyplot as plt figureOne = plt.figure() axesOne = figureOne.add_axes([0, 0, 1, 1]) axesOne.plot([-1, 1], [-2, 2]) axesOne.plot([-2, 2], [-1, 1]) axesOne.set_xlim((-3, 3)) axesOne.set_ylim((-3, 3)) figureOne.set_figwidth(2) figureOne.set_figheight(2)

Re: [Matplotlib-users] Plotting boolean/logical data type

2010-03-18 Thread Friedrich Romstedt
2010/3/4 Timo Heine timo.he...@gmail.com: Basically what I want to do is to draw a horizontal line with relative y co-ordinates and absolute xmin and xmax co-ordinate. Then I could draw a line when a bit is high and have it always in plot area even when zooming etc. Like axhline(...) but with

Re: [Matplotlib-users] Using colourmap from matplotlib

2010-03-18 Thread Friedrich Romstedt
2010/3/18 Ciarán Mooney general.moo...@googlemail.com: value = (log(x)/log(largest))*255 Just two thoughts: 1) I doubt the statement cited above is not correct, as it may also yield negative values as soon as 0 x 1. In fact, you are calculating log_{largest}(x). This

Re: [Matplotlib-users] Using colourmap from matplotlib

2010-03-21 Thread Friedrich Romstedt
2010/3/20 Ciarán Mooney general.moo...@googlemail.com: I am using PIL because I plan to plug in a Tkinter interface which can directly accept PIL image instances. You can render matplotlib figures to PIL using following code: figure.set_size_inches(float(shape[0]) / figure.dpi, float(shape[1])

Re: [Matplotlib-users] basemap and py2exe

2010-03-22 Thread Friedrich Romstedt
I'm not shure whether the following suggestion solves your problem, but it would simplify your script anyway. import matplotlib ... setup(..., data_files = matplotlib.get_py2exe_datafiles()) And maybe don't forget to exclude 'libgdk_pixbuf-2.0-0.dll' (on my system) in 'dll_excludes'. But I

Re: [Matplotlib-users] Trouble embedding toolbar in Tk using grid

2010-03-25 Thread Friedrich Romstedt
2010/3/24 Jonno jonnojohn...@gmail.com: Well I realized my error with the extra window being caused by the TopLevel() command. I switched this to Tk.Tk() and it works nicely. However I still have to pack the frame instead of using grid. I can work around this but I wonder if there isn't

Re: [Matplotlib-users] Problems using bar() with left containing an array of float

2010-03-26 Thread Friedrich Romstedt
2010/3/26 timothee cezard tcez...@staffmail.ed.ac.uk: does it make sense to use something like plt.bar(bins, nb_per_bin, width=(max(bins)-min(bins)) / (1.5*len(bins))) I think that should work, although you should use (max(bins) - min(bins) / 1.5 / (len(bins) - 1), but I would suggest: bounds

Re: [Matplotlib-users] Making a data-driven colormap

2010-03-27 Thread Friedrich Romstedt
2010/3/27 Ariel Rokem aro...@berkeley.edu: I am trying to make a color-map which will respond to the range of values in the data itself. That is - I want to take one of the mpl colormaps and use parts of it, depending on the range of the data. In particular, I am interested in using the

Re: [Matplotlib-users] Basemap white space

2010-03-28 Thread Friedrich Romstedt
2010/3/28 Filipe Pires Alvarenga Fernandes ocef...@gmail.com: Hello list I've trying for a while a python only solution to remove white spaces that Basemap generate to keep the aspect ratio. I found these two threads that explain the issue better: I think maybe you can make use of the Agg

Re: [Matplotlib-users] contourf problem

2010-03-28 Thread Friedrich Romstedt
2010/3/29 Alan G Isaac alan.is...@gmail.com: OK, it's obvious one you point it out. Sorry for the typo in the example. Now suppose I want a colorbar labelled at -1, 0, 1 but the highest value realized is 1. Can I somehow use ticks=(-1,0,1) anyway, or do I have to tick at the realized

Re: [Matplotlib-users] Making a data-driven colormap

2010-03-28 Thread Friedrich Romstedt
2010/3/28 Chloe Lewis chle...@berkeley.edu: That would be a lot nicer, Friedrich; could you share demo code?  I can't make the set_ylim work, but I think I'm being clumsy with the object model. It seems that I cannot read the sections following after the From this: and I get this:? But anyway,

[Matplotlib-users] ticker.FixedLocator bug

2010-03-28 Thread Friedrich Romstedt
matplotlib.ticker:748: # ORIGINAL: # step = max(int(0.99 + len(self.locs) / float(self.nbins)), 1) step = int(math.ceil(len(self.locs) / (self.nbins + 1))) There is a from __future__ import division statement. Who verifies (or falsifies)? I checked with values len(locs)

[Matplotlib-users] colorbar.Colorbar ticking

2010-03-28 Thread Friedrich Romstedt
I noticed that colorbar.Colorbar treats segmentation via *boundaries* as compulsory, i.e., it thinks it must tick at the *boundaries* or nowhere. Wouldn't it be useful to have an kwarg which overrides this and always uses ticker.MaxNLocator()? Friedrich

Re: [Matplotlib-users] contourf problem

2010-03-28 Thread Friedrich Romstedt
2010/3/29 Alan G Isaac alan.is...@gmail.com: Can you explain this: norm = colors.Normalize(vmin = -1, vmax = 1) The normaliser takes some arbitrary value and returns a value in [0, 1]. Hence the name. The value \in [0, 1] is handed over to the cmap's __call__(), resulting in the color value.

Re: [Matplotlib-users] colorbar.Colorbar ticking

2010-03-29 Thread Friedrich Romstedt
2010/3/29 Eric Firing efir...@hawaii.edu: 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 MaxNLocator. See the ColorbarBase._ticker method. Ah,

Re: [Matplotlib-users] Making a data-driven colormap

2010-03-29 Thread Friedrich Romstedt
2010/3/29 Friedrich Romstedt friedrichromst...@gmail.com: Note that the ticking is a bit weird, there is also a bug in matplotlib I will report on right after this e-mail, whose bugfix you will maybe want to apply to get ticking properly working.  When you have insane values for C.min

Re: [Matplotlib-users] Making a data-driven colormap

2010-03-30 Thread Friedrich Romstedt
2010/3/30 Ariel Rokem aro...@berkeley.edu: I ended up with the code below, using Chloe's previously posted 'subcolormap' and, in order to make the colorbar nicely attached to the main imshow plot, I use make_axes_locatable in order to generate the colorbar axes. I tried it out with a couple of

Re: [Matplotlib-users] Basemap white space

2010-03-30 Thread Friedrich Romstedt
2010/3/30 Filipe Pires Alvarenga Fernandes ocef...@gmail.com: However, my knowledge of python is very limited, even though I think I understood what you suggested I do not know how to get the shape (of the figure?) for this part: fig.set_size_inches(float(shape[0]) / dpi, float(shape[1]) /

Re: [Matplotlib-users] Making a data-driven colormap

2010-03-30 Thread Friedrich Romstedt
2010/3/30 Chloe Lewis chle...@berkeley.edu: But this example doesn't solve the problem I was thinking of: it shows lots of colors in the colorbar that aren't used in the plot. I'm so stupid! Here is the correct code. I just interchanged -bounds, bound with min_val, max_val on line 28. The

Re: [Matplotlib-users] How to save file in to image in desired resolution in matplotlib?

2010-04-01 Thread Friedrich Romstedt
The list config got me, so to the list too ... 2010/3/31 Matthias Michler matthiasmich...@gmx.net: On Wednesday 31 March 2010 09:24:10 yogesh karpate wrote: Dear All, I am using one image of 235X130 and plotting the curve on it, now when i save it it goes in the resoltuion of

Re: [Matplotlib-users] a quick way to plot 3D surface with point coordination?

2010-04-01 Thread Friedrich Romstedt
2010/4/1 ericyosho ericyo...@gmail.com: And we know that for points with coordination, scatter must be the simplest way to visualize them. Is there any trick to convert a scatter graph into a surface picture directly? I'm afraid not, because one needs an algorithm to infer the connectivity :-(

Re: [Matplotlib-users] Cmap creation

2010-04-01 Thread Friedrich Romstedt
You forgot about the attachment? Friedrich -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance.

Re: [Matplotlib-users] speed up imports?

2010-04-01 Thread Friedrich Romstedt
Hmm, I wrote one time a lazy-import module, you create objects and use their attributes, but the object imports the module not earlier than the first attribute access. Thus these objects are used like the module via import module. I.e., module = Lazy('matplotlib.module'). There are also

Re: [Matplotlib-users] a quick way to plot 3D surface with point coordination?

2010-04-03 Thread Friedrich Romstedt
I think it should be possible to do unsorted scatter plot, so you can avoid the second loop. Maybe the current source doesn't allow for, but it's certainly possible (hu, I'm not that aquainted with current z-sorting code, so maybe I'm wrong?) It may be that current z-sorting uses the mesh grid.

Re: [Matplotlib-users] Cmap creation

2010-04-03 Thread Friedrich Romstedt
Oh, sorry, it was late at night, and so on, but in fact you said it's a standard example, so well ... I was wrong. Friedrich 2010/4/1 Friedrich Romstedt friedrichromst...@gmail.com: You forgot about the attachment? Friedrich

Re: [Matplotlib-users] Basemap white space

2010-04-08 Thread Friedrich Romstedt
2010/4/8 Filipe Fernandes ocef...@gmail.com: BTW: What I meant by limitation is the fact that Agg has no GUI like the nice QT window I was using before. The users of this script have no experience with scripting languages and enjoyed choosing the format and filename using a GUI interface. I'm

Re: [Matplotlib-users] can't interact with embedded gtk

2010-04-09 Thread Friedrich Romstedt
I think the Figure you create may be not registered in the pylab framework, and indeed I think this is not a bug. The --pylab switch tries to obtain the active figure, but because there is no active pyplot-Figure, it gets None from get_active() in your traceback. Then it fails. I think --pylab

Re: [Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-11 Thread Friedrich Romstedt
2010/4/11 tomislav_ma...@gmx.com tomislav.ma...@gmx.com: can someone help me to plot a polygon in matplotlib? I have been reading about the axes.patches.Polygon class and I have defined the Polygon object that has a preset lw and points. How do I plot it? Here

Re: [Matplotlib-users] how to plot a Polygon / plt.draw() problem

2010-04-12 Thread Friedrich Romstedt
2010/4/11 Alan G Isaac alan.is...@gmail.com: On 4/11/2010 9:27 AM, Friedrich Romstedt wrote: I think you can use Tk via the Tkinter Python package.  On linux I heard it's looking a bit weird, but as a starting points it's easy enough. Weird how? Will that be fixed with the new release (ttk

Re: [Matplotlib-users] Basemap white space

2010-04-13 Thread Friedrich Romstedt
2010/4/12 Filipe Pires Alvarenga Fernandes ocef...@gmail.com: Thanks for point TKinter to me. However, I'm stuck again. I've tried two approaches, one is following what you suggested: Tkinter   import Tkinter as tk root = tk.Tk() from PIL import Image, ImageTk image =

Re: [Matplotlib-users] Importing pylab causes exception - any ideas?

2010-04-14 Thread Friedrich Romstedt
2010/4/14 Jon Moore jonr_mo...@yahoo.co.uk: Hi, Find attched log.txt generated when trying to run your script.  Any thoughts? Sounds like a typo to me. Please give the new version of crashtest.py a try, it prints stack tracebacks for each import statement into the file, so we *should* be

Re: [Matplotlib-users] Forcing full value on axis (Dave Simpson)

2010-04-17 Thread Friedrich Romstedt
2010/4/15 KrishnaPribadi krishna.prib...@harley-davidson.com: Is there any way to just turn off the exponent number in the right corner and force the x tick labels to be integers or floating point depending on how close one is zoomed? Have a look at matplotlib/ticker.py. Most classes in

Re: [Matplotlib-users] Bold Latex Tick-Labels

2010-04-19 Thread Friedrich Romstedt
http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.FuncFormatter 2010/4/10 konstellationen konstellatio...@gmail.com: For future reference, the solution proposed by Gökhan and Diakronik is to replace the Latex tick-labels with strings: import matplotlib.pyplt as plt

Re: [Matplotlib-users] Bold Latex Tick-Labels

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Friedrich Romstedt friedrichromst...@gmail.com: http://matplotlib.sourceforge.net/api/ticker_api.html#matplotlib.ticker.FuncFormatter For exponential ticks, I would propose (but it's untested): def exp_fmt(loc):        exponent = numpy.round(numpy.log10(loc))        return '$10^%d

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

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Eric Firing efir...@hawaii.edu: 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

Re: [Matplotlib-users] Bold Latex Tick-Labels

2010-04-19 Thread Friedrich Romstedt
2010/4/19 Michael Droettboom md...@stsci.edu: Friedrich Romstedt wrote:   What is the advantage of using matplotlib.ticker.ScalarFormatter(useMathText = True) then, when it's typeset in outside-math font anyway? It's the only way to get superscripts (well, Unicode has superscript numerals

Re: [Matplotlib-users] Complex layouts of subplots

2010-05-07 Thread Friedrich Romstedt
2010/5/7 Bartosz Telenczuk bartosz.telenc...@gmail.com: Dear all, I am working on figures for my thesis, which consist of several related panels. Each of the panel contains several subplots. In order to arrange the plots I would like to split the figure into two (or more) panels and within each

Re: [Matplotlib-users] Compiling matplotlib against 64 bit python 2.6 on OSX Snow Leopard

2010-05-27 Thread Friedrich Romstedt
2010/5/25 Pim Schellart p.schell...@gmail.com: I tried both and although it now seems to find the libraries it still fails to link something. src/_png.cpp:293: error: ‘png_infopp_NULL’ was not declared in this scope src/_png.cpp:293: error: ‘png_infopp_NULL’ was not declared in this scope I

Re: [Matplotlib-users] Compiling matplotlib against 64 bit python 2.6 on OSX Snow Leopard

2010-05-27 Thread Friedrich Romstedt
Dear Pim, 2010/5/27 Pim Schellart p.schell...@gmail.com: At first I used the binaries for the latest stable releases of Python 2.6 + numpy + matplotlib from the respected websites. But in order to compile a custom library I needed Python to be compiled 64 bit. For me this was the same with

Re: [Matplotlib-users] Plotting irregular 2d data

2010-06-08 Thread Friedrich Romstedt
Z = numpy.zeros((y_shape, x_shape)) x = your_flat_indices_in_x y = your_flat_indices_in_y z = your_flat_z_data If you have only coordinates, then try to figure out the indices in some way. Then do: Z[zip(y, x)] = z and figure out the coordinates that correspond to the mesh meant by Z. It's

Re: [Matplotlib-users] 2D polar surface plot

2010-06-18 Thread Friedrich Romstedt
2010/6/16 Michael Droettboom md...@stsci.edu: pcolor runs directly on polar plots just fine.  No need to convert polar to cartesian outside of matplotlib. It's true, but at the expense of pretty much time, since the arcs must be rendered properly. If your data is dense enough in r and phi, a

Re: [Matplotlib-users] matplotlab freezes with a graph and toolbar

2010-06-18 Thread Friedrich Romstedt
2010/6/15 Eliot Glairon ejg_...@yahoo.com: class simpleapp_tk(Tkinter.Tk):#initialize    def __init__(self,parent):        Tkinter.Tk.__init__(self,parent)        self.grid() It sounds a bit odd to me to attemt to .grid() a Tk instance ... The Tkinter.Tk() instance is the toplevel application

Re: [Matplotlib-users] Demo does not work on Snow Leopard

2010-06-18 Thread Friedrich Romstedt
2010/6/17 Hana Sevcikova h...@cs.washington.edu: I installed matplotlib-0.99.3-py2.6-macosx10.6.dmg on MacOS X 10.6.3, python 2.6.5. But I get an error when running the histogram example from http://matplotlib.sourceforge.net/examples/api/histogram_demo.html Have you compiled Python yourself?

Re: [Matplotlib-users] Demo does not work on Snow Leopard

2010-06-18 Thread Friedrich Romstedt
2010/6/18 Hana Sevcikova h...@cs.washington.edu: I installed python-2.6.5-macosx10.3-2010-03-24.dmg from python.org. (Sorry, I should have mentioned that before.) Hmm, could you please run: otool -L /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload/_tkinter.so otool

Re: [Matplotlib-users] Demo does not work on Snow Leopard

2010-06-22 Thread Friedrich Romstedt
Many apologises for the slow response ... I'm quite convinced the path is not an issue. 2010/6/19 Hana Sevcikova h...@cs.washington.edu: I see there are some compatibility issues. What would be the best way to deal with it? This should be the issue. I think usually the matplotlib binaries

Re: [Matplotlib-users] Symbol not found

2010-06-27 Thread Friedrich Romstedt
First, since you said you used pkg-config I would like to know what libfreetype the ft2font.so lib is actually linked against. Can you issue an otool -L ft2font.so in the matplotlib's directory? This will tell you what libs are used. I think most important is the compiler used, but since you

Re: [Matplotlib-users] colorbar rescaling

2010-06-28 Thread Friedrich Romstedt
2010/6/28 Alexander Dietz alexanderdie...@googlemail.com: I have a plot, to which I am drawing a colorbar. The standard colorbar ranges from the values -1 (blue) over 0 (green) to e.g. 1(red). So far so good. But now I want to change the colorbar that it shows only the colors between 0 and 1.

Re: [Matplotlib-users] abort trap

2010-06-29 Thread Friedrich Romstedt
2010/6/29 Ranjit Chacko rjcha...@gmail.com: I tried again by compiling version 2.4.11 of freetype instead of the latest and recompiling matplotlib with that and now I get the following less severe error:   Reason: Incompatible library version: ft2font.so requires version 11.0.0 or later, but

Re: [Matplotlib-users] installation of matplotlib on OS X 10.5 with python.org Python 2.6

2010-07-07 Thread Friedrich Romstedt
resending to the list too, fwiw. 2010/7/5 Stephen T. obsessiv...@hotmail.com: Hi, I am having trouble installing matplotlib. I have OS X 10.5 with Python 2.6 downloaded and installed from python.org. (10.5 came with Apple Python 2.5). I've also installed NumPy and SciPy for Python 2.6. Since

Re: [Matplotlib-users] permission denied error

2010-07-13 Thread Friedrich Romstedt
2010/7/12 Isaac Salazar i...@lanl.gov: Hello, I am getting a permission error when trying to open a figure or plotting using matplotlib. TclError: couldn't open /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/matplotlib/mpl-data/images/home.ppm: permission

Re: [Matplotlib-users] permission denied error

2010-07-13 Thread Friedrich Romstedt
010/7/13 Isaac Salazar i...@lanl.gov I have read access to the directory and have an admin account, however, i'm not the user who set up the machine (084535) The home.ppm file and others in that directory show  Write only (Drop Box) for admin. For everyone, the permissions are set to No

Re: [Matplotlib-users] installation of matplotlib on OS X 10.5 with python.org Python 2.6

2010-07-17 Thread Friedrich Romstedt
2010/7/15 Stephen T. obsessiv...@hotmail.com: BUILDING MATPLOTLIB             matplotlib: 1.0.svn                 python: 2.6.5 (r265:79359, Mar 24 2010, 01:32:55)  [GCC                         4.0.1 (Apple Inc.

Re: [Matplotlib-users] print to aprint device!

2010-07-17 Thread Friedrich Romstedt
2010/7/15 Benjamin Root ben.r...@ou.edu: Assuming you are using Linux or a Mac, I wonder if it is somehow possible to save a .ps file to a postscript device?  I have never had to do any Linux magic with CUPS, so maybe this isn't possible.  Anybody else have any thoughts? Normally you can cat

Re: [Matplotlib-users] scientific notation

2010-07-17 Thread Friedrich Romstedt
2010/7/15 Waléria Antunes David waleriantu...@gmail.com: But, i don't know how do... I tried, but don't, most failed Maybe this is something in the direction you want? You have to adapt the test file. Friedrich embedded_sci_formatter.py Description: Binary data attachment: test.png

Re: [Matplotlib-users] Confusion Matrix

2010-07-17 Thread Friedrich Romstedt
2010/7/16 Simon Friedberger simon+matplot...@a-oben.org: Hello List. I'm trying to plot a confusion matrix and I got this far: http://paste.pocoo.org/show/238332/ Basically what I still want to do is get the ticklabels from the bottom to the top, have every ticklabel shown and start showing

Re: [Matplotlib-users] Confusion Matrix

2010-07-18 Thread Friedrich Romstedt
2010/7/18 Simon Friedberger simon+matplot...@a-oben.org: On 22:49 Sat 17.07.10, Friedrich Romstedt wrote: Maybe try to use axes.set_xticks() first, see http://matplotlib.sourceforge.net/api/axes_api.html#matplotlib.axes.Axes.set_xticks . I know about that but couldn't find any useful way

Re: [Matplotlib-users] ft2font error on OSX 10.6 using py2app

2010-07-22 Thread Friedrich Romstedt
2010/7/20 Søren Nielsen soren.skou.niel...@gmail.com: Hi, I'm creating a stand alone program on my mac with OSX 10.4 and it seems to work great on it. However, if I transfer my program to a snow leopard (10.6) mac, I get the error:

Re: [Matplotlib-users] Compile error

2010-07-22 Thread Friedrich Romstedt
2010/7/20 Tommy Grav tg...@mac.com: I am trying to compile matplotlib for ActiveState 2.7.0.1 - 64bit on mac os x. I have installed numpy 1.4.1 and scipy 0.8.0 from source. Compiling matplotlib using sudo make -f make.osx fetch deps mpl_build mpl_install works fine, but sudo python

Re: [Matplotlib-users] Documentation error/bug?

2010-07-27 Thread Friedrich Romstedt
2010/7/26 Benjamin Root ben.r...@ou.edu: After some reading of sphinx documentation, it appears to be a bug with sphinx (or actually, smartypants) because it should not be doing this sort of interpretation within a docstring.  Anyway, supposedly the workaround is to put double backticks around

Re: [Matplotlib-users] Fit a plane to a set of xyz points

2010-07-27 Thread Friedrich Romstedt
2010/7/26 Mathew Yeates mat.yea...@gmail.com: Is there a simple function call for this? And finding the distance of a point to the plane? Hmm, when you are interested in the z distance alone, it should be a matrix equation: Z = X * m_x + Y * m_y + 1 * n Meaning you can invert it with

Re: [Matplotlib-users] Confusion Matrix

2010-07-31 Thread Friedrich Romstedt
2010/7/29 Simon Friedberger simon+matplot...@a-oben.org: For some magical reason when I set the ticks_position to none, setting the label_position to 'top' is ignored. Did you try this? Is it another command arrangement thing? On 09:26 Thu 29.07.10, Friedrich Romstedt wrote

Re: [Matplotlib-users] Matplotlib-users Digest, Vol 50, Issue 79

2010-07-31 Thread Friedrich Romstedt
2010/7/29 Waléria Antunes David waleriantu...@gmail.com: Hi Benjamim, I made the changes as bellow and it displays the x-axis values formatted as expected, see my current image and my code. But, now i need to change the scale and the numbers of decimal places in order to appear on the graph

Re: [Matplotlib-users] Permission error after installing MPL 1.0 on Mac

2010-07-31 Thread Friedrich Romstedt
2010/7/30 Jeremy Conlin jlcon...@gmail.com: I recently installed MPL on two Macs, one running 10.6 and another running 10.5.  When I try to plot, I get the following error: TclError: couldn't open

Re: [Matplotlib-users] Confusion Matrix

2010-08-08 Thread Friedrich Romstedt
2010/8/8 Simon Friedberger simon+matplot...@a-oben.org: I have found a solution. I'm not sure if it's good or intended but the following works: for label in xax.get_ticklabels():        label.set_rotation(45)        label.set_horizontalalignment('left') This is fully intended. Maybe you

Re: [Matplotlib-users] Confusion Matrix

2010-08-09 Thread Friedrich Romstedt
2010/8/9 John Hunter jdh2...@gmail.com: On Sun, Aug 8, 2010 at 8:03 PM, Friedrich Romstedt friedrichromst...@gmail.com wrote: P.S.: You can also try http://matplotlib.sourceforge.net/examples/pylab_examples/alignment_test.html , I believe there was some other manual around also covering

Re: [Matplotlib-users] installation of matplotlib on OS X 10.5 with python.org Python 2.6

2010-08-09 Thread Friedrich Romstedt
2010/8/7 Russell E. Owen ro...@uw.edu: In article snt131-w29254d6077b5b2f95c81a3bb...@phx.gbl,  Stephen T. obsessiv...@hotmail.com  wrote: Hi, I am having trouble installing matplotlib. I have OS X 10.5 with Python 2.6  downloaded and installed from python.org.  (10.5 came with Apple  

Re: [Matplotlib-users] Win7. Why Don't Matplotlib, ... Show up in Control Panel Add-Remove?

2010-08-09 Thread Friedrich Romstedt
2010/8/9 Wayne Watson sierra_mtnv...@sbcglobal.net: See Subject. I use matplotlib, scipy, numpy and possibly one other module. If I go to the control panel, I only see numpy listed. Why? I use a search and find only numpy and Python itself. How can matplotlib and scipy be uninstalled? I think

Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-09 Thread Friedrich Romstedt
2010/8/9 Markus Baden markus.ba...@gmail.com: On my Macbook Pro I use Python 2.6 as provided by the Enthought Python Distribution. I ran into some problem with Axes3D so I decided to upgrade to the latest version from source. While trying that I got a similiar error message as discussed in

Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-10 Thread Friedrich Romstedt
Are you on OSX 10.5 or 10.6? I'm asking because it's important for others when you're on 10.5 because you're using gcc-4.0 then, while 10.6 users have at least for non-Python (distutils) compilations gcc-4.2 as default. Friedrich

Re: [Matplotlib-users] Building matplotlib from source with libpng (png.h) installed via fink on Mac OS X

2010-08-11 Thread Friedrich Romstedt
2010/8/11 Markus Baden markus.ba...@gmail.com: I'm running Mac OS X 10.5.8. Ok, that explains why it works to flawlessly. When you would be on 10.6, you would probably run into the problem I mentioned, because the software is compiled /also/ for 10.5, and hence with gcc-4.0. Lucky one ;-) -

Re: [Matplotlib-users] Disable Colorbar Scaling In Contour Plot

2010-08-11 Thread Friedrich Romstedt
2010/8/11 tgabriel travisgabri...@gmail.com: I would like to have the colorbar displaying the same color scaling regardless of the data input. This /should/ be feasible with .contourf(.., vmin=VMIN, vmax=VMAX), but from the doc this isn't clear at least. If it doesn't work, we have to work out

Re: [Matplotlib-users] embed matplotlib Figure into Tkinter Canvas

2010-08-16 Thread Friedrich Romstedt
2010/8/13 Andrea Tomadin gurnem...@me.com: Dear John, thank you for your suggestion.  Unfortunately, I have just tried that and I am positive that it does not work. It works only if the option frameon of the figure is True, which is not what I want in this case (I have to produce a pdf

Re: [Matplotlib-users] installation of matplotlib on OS X 10.5 with python.org Python 2.6

2010-08-17 Thread Friedrich Romstedt
2010/8/17 Stephen T. obsessiv...@hotmail.com: http://passingcuriosity.com/2009/installing-pil-on-mac-os-x-leopard/ That's a good thing to know when people run into /opt/ trouble of this kind ... Thanks So I had in mind to try this with the matplotlib installation, but for some reason the make

Re: [Matplotlib-users] Sequential Calls to create bar charts jumbles output on second. first always ok.

2010-08-18 Thread Friedrich Romstedt
2010/8/14 Rob Schneider rmsc...@rmschneider.com: Agreed. The only thing I can think of is that the second figure is reusing the first. You can try calling plt.figure() at the beginning of the functions to create a new figure, or call plt.figure() in between the calls to

  1   2   >