>> 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
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
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 Windows
2010/7/20 Tommy Grav :
> 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 setup.py bu
2010/7/20 Søren Nielsen :
> 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:
>
> dlopen(/Volumes/KINGSTON/Mac/RAW.app/Contents/Resources/lib/python2.6/matplotlib/
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, f
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 matplot
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 wrote:
> 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
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
---
On Thu, Jul 22, 2010 at 3:30 AM, aliko 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!
>
> import sys
>
> fr
Which backend are you using? Can you provide a short script that
reproduces the bug?
Mike
On 07/22/2010 11:18 AM, Tobias Winchen wrote:
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
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 aga
No, I don't think the issue is a flip in the y-axis. I have a number
of different examples of this, and many in which the contour is an
ellipse so I can tell that the overall positioning is correct. It
seems like something is going wrong only when I save the image...
Thanks for the suggestion tho
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
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 e
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 b
On 7/22/10 7:48 AM, mdekauwe wrote:
> 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)
On Wed, Jul 21, 2010 at 3:40 PM, Jenna Lemonias wrote:
> 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 image. This
> shift is
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 bounda
On Thu, Jul 22, 2010 at 8:07 AM, John Hunter wrote:
> On Thu, Jul 22, 2010 at 7:58 AM, alberttresens
> 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 --
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 previ
On Thu, Jul 22, 2010 at 7:58 AM, alberttresens 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 previous
post will help
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 fr
On Thu, Jul 22, 2010 at 3:48 AM, alberttresens 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 require significant editi
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
here...http://www.mail-archive.com/matplotli
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 inpu
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 "/usr/local/lib/p
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 matplotlib.backends.b
28 matches
Mail list logo