Re: [Matplotlib-users] matplotlib1.0 via easy_install

2010-07-22 Thread Andreas
Hi there, I try to install matplotlib 1.0 via easy install. But a simple easy_install -U matplotlib produces this, effectively installing 0.99.1 Searching for matplotlib Reading http://pypi.python.org/simple/matplotlib/ Reading http://matplotlib.sourceforge.net Reading

Re: [Matplotlib-users] [matplotlib] strange bar graph - can mpl plot this

2010-07-22 Thread Benjamin Koep
Hello João, this was really helpful. I really appreciate your work. Thanks so far, Ben On Wed, 21 Jul 2010 13:19:21 +0100 João Luís Silva jsi...@fc.up.pt wrote: On 07/21/2010 12:27 PM, Benjamin Koep wrote: Hello, I got a big problem currently and i really hope that someone here can

[Matplotlib-users] Axises autoscaling in animated plot

2010-07-22 Thread aliko
Could please anyone help me to get axises autoscaling in following example? I took it from the examples and slightly modified it to remove all unecessary things trying to make it as short as possible. Thanks in advance! import sys from matplotlib.figure import Figure from

Re: [Matplotlib-users] Plot() : IndexError: index out of range for array

2010-07-22 Thread alberttresens
Hi, Thanks for the reply. I did already try it and still go the same trace back. I tried with long arrays [1,2,,n] and with short ones. I also tried with single numbers. How can it get an out of range array? File gcview.py, line 87, in drawGraph plot([0],[0]) File

Re: [Matplotlib-users] Plot() : IndexError: index out of range for array

2010-07-22 Thread alberttresens
Might be usefull, that is the script I am trying to run. I has some checks, but is basiclly from Salmon Run Blog: #!/usr/bin/python import os import sys import re import time from stat import * from pylab import * from matplotlib import * def parse(line): Parses an input

[Matplotlib-users] Basemap + contour layer?

2010-07-22 Thread mdekauwe
Hi, I am trying to plot an image using basemap and overlay another image plotted as a contour and I am a bit stuck. e.g. I have a small image of the world for example (10.5-13.5N, 1.5-3.5E, regular lat long grid). And I saw what was posted previously

Re: [Matplotlib-users] Plot() : IndexError: index out of range for array

2010-07-22 Thread John Hunter
On Thu, Jul 22, 2010 at 3:48 AM, alberttresens albert.tres...@gmail.com wrote: Might be usefull, that is the script I am trying to run. I has some checks, but is basiclly from Salmon Run Blog: We can't run this because when you pasted the text into the browser it was line wrapped and would

Re: [Matplotlib-users] Plot() : IndexError: index out of range for array

2010-07-22 Thread alberttresens
http://old.nabble.com/file/p29236565/gcview.py gcview.py http://old.nabble.com/file/p29236565/gc.log gc.log Hi here the files you were asking for. -- View this message in context: http://old.nabble.com/Plot%28%29-%3A-IndexError%3A-index-out-of-range-for-array-tp29226333p29236565.html Sent

Re: [Matplotlib-users] Plot() : IndexError: index out of range for array

2010-07-22 Thread John Hunter
On Thu, Jul 22, 2010 at 7:58 AM, alberttresens albert.tres...@gmail.com wrote: http://old.nabble.com/file/p29236565/gcview.py gcview.py http://old.nabble.com/file/p29236565/gc.log gc.log Hi here the files you were asking for. Works fine for me -- most likely one of my suggestions in the

Re: [Matplotlib-users] Basemap + contour layer?

2010-07-22 Thread Jeff Whitaker
On 7/22/10 3:53 AM, mdekauwe wrote: Hi, I am trying to plot an image using basemap and overlay another image plotted as a contour and I am a bit stuck. e.g. I have a small image of the world for example (10.5-13.5N, 1.5-3.5E, regular lat long grid). And I saw what was posted previously

Re: [Matplotlib-users] Plot() : IndexError: index out of range for array

2010-07-22 Thread John Hunter
On Thu, Jul 22, 2010 at 8:07 AM, John Hunter jdh2...@gmail.com wrote: On Thu, Jul 22, 2010 at 7:58 AM, alberttresens albert.tres...@gmail.com wrote: http://old.nabble.com/file/p29236565/gcview.py gcview.py http://old.nabble.com/file/p29236565/gc.log gc.log Hi here the files you were asking

Re: [Matplotlib-users] Basemap + contour layer?

2010-07-22 Thread mdekauwe
Ok... how about this? import numpy as np from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt # generate some random data - i.e. what would be an image of the world, say different # land covers data = np.random.randint(10,27,100*67).reshape(100, 67) # I want to draw a

Re: [Matplotlib-users] Saving as eps file shifts image?

2010-07-22 Thread Benjamin Root
On Wed, Jul 21, 2010 at 3:40 PM, Jenna Lemonias je...@astro.columbia.eduwrote: I am trying to save a matplotlib 2d array image with an overlaid contour as an eps file. The contour appears to be shifted with respect to the image underneath in the eps file, particularly when I zoom in on the

Re: [Matplotlib-users] Basemap + contour layer?

2010-07-22 Thread mdekauwe
Hi Jeff, Yes you are right! Apologies. Whilst it is easy enough to define the grid in this case as it is a regular lat,long grid. If it was for example a geostationary grid, I think this might be more difficult. Is there a way to return the grid for example from the basemap call, which can then

Re: [Matplotlib-users] Basemap + contour layer?

2010-07-22 Thread Jeff Whitaker
On 7/22/10 8:08 AM, mdekauwe wrote: Hi Jeff, Yes you are right! Apologies. Whilst it is easy enough to define the grid in this case as it is a regular lat,long grid. If it was for example a geostationary grid, I think this might be more difficult. Is there a way to return the grid for

Re: [Matplotlib-users] Basemap + contour layer?

2010-07-22 Thread mdekauwe
Hi Jeff, That sounds like the perfect solution as I do have the lat, lons - I'll give that a go! Thanks again, Martin Jeff Whitaker wrote: On 7/22/10 8:08 AM, mdekauwe wrote: Hi Jeff, Yes you are right! Apologies. Whilst it is easy enough to define the grid in this case as it is a

[Matplotlib-users] imshow and projection axes

2010-07-22 Thread Tobias Winchen
Dear all, in matplotlib version 0.99.0 when drawing images with imshow into figures with hammer or aitoff axes the images are clipped to the axes. Now this has changed in and the images are drawn also outside the axes (version 0.99.3) or not drawn at all (version 1.0.0). How can I clip them

Re: [Matplotlib-users] Axises autoscaling in animated plot

2010-07-22 Thread Benjamin Root
On Thu, Jul 22, 2010 at 3:30 AM, aliko ali.tli...@gmail.com wrote: Could please anyone help me to get axises autoscaling in following example? I took it from the examples and slightly modified it to remove all unecessary things trying to make it as short as possible. Thanks in advance!

[Matplotlib-users] Text drawing outside plotting area when zoomed in

2010-07-22 Thread Aman Thakral
Hi all, The text draws outside the plotting area when you zoom in. Sample code is attached. To re-create the issue, just use the zoom rect function on the plot. Is there a way to fix this? Thanks, Aman text_issue.py Description: Binary data

Re: [Matplotlib-users] Text drawing outside plotting area when zoomed in

2010-07-22 Thread Aman Thakral
Sorry, that was a silly question. I just set the clip_on to True to fix this. On Thu, Jul 22, 2010 at 1:45 PM, Aman Thakral aman.thak...@gmail.comwrote: Hi all, The text draws outside the plotting area when you zoom in. Sample code is attached. To re-create the issue, just use the zoom

[Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Jim Vickroy
Hello, Apologies for reposting my question from yesterday (save image as color-mapped 8-bit rather than true-color). I am hoping this reposting clarifies what I am trying to accomplish. The attachment is a simple script that creates a 2D array of unsigned, 8-bit integers and uses

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Christopher Barker
Jim Vickroy wrote: The attachment is a simple script that creates a 2D array of unsigned, 8-bit integers and uses matplotlib to save it as a PNG file. Unfortunately, the PNG file is much larger than expected -- apparently because it is True-Color; on my MS Windows machine, bit depth, for

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] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread j vickroy
Christopher Barker wrote: Jim Vickroy wrote: The attachment is a simple script that creates a 2D array of unsigned, 8-bit integers and uses matplotlib to save it as a PNG file. Unfortunately, the PNG file is much larger than expected -- apparently because it is True-Color; on my MS

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Eric Firing
On 07/22/2010 03:40 PM, j vickroy wrote: Christopher Barker wrote: Jim Vickroy wrote: The attachment is a simple script that creates a 2D array of unsigned, 8-bit integers and uses matplotlib to save it as a PNG file. Unfortunately, the PNG file is much larger than expected -- apparently

Re: [Matplotlib-users] how to save pseudo-colorized images as 8-bit PNG files

2010-07-22 Thread Eric Firing
You can post-process the image with something like ImageMagick. Another alternative is to use PIL -- you can grab the matplotlib buffer, make a PIL image out of it, and use PIL to convert to an 8-bit palleted image. For that matter, you could probably bypass MPL, and use numpy to create