Hi,
I am plotting overlapping bars in a bar chart. In some places one bar
overlaps the other so I would like to draw a horizontal line to show where
the underlying bar extends to. My plots are postscripts so I can't use
alpha. The only way I could come up with involves me figuring out by trial
Yes and no. My understanding of stacked bars is the bar stacked on top is
always larger than the one below. I am trying to show how much the second
bar explains of the first bar. In my case though it is possible the second
bar is larger than the first. As a consequence you wouldn't see both bars
Hi,
For all those using newer macs [and I assume other newer computers] the
resolution on the plt.show popup window is a little rough (not sure of the
technical name). Is there a way to double up the resolution? I tried
changing a few things but none of them seemed to make much difference. Does
I tried your suggestions...the first one (Qt4Agg) resulted in an error
(below) so it looks like I am missing some packages and the second option
(TkAgg) pretty much gave the same quality as the macosx backend.
thanks.
File
Well perhaps it is fine, I wasn't really suggesting it was a bug. Just if I
stretched the plot window a bit the resolution looked a bit fuzzier than i
remembered. Perhaps my memory isn't a good test and I will compare it to the
computer at work. I just did a screen print and it looks fine unless
So you do want a histogram then? I assume you have all of this sorted then,
the histogram function is very good.
Cheers,
Martin
--
View this message in context:
http://old.nabble.com/How-do-you-Plot-data-generated-by-a-python-script--tp32328822p32394062.html
Sent from the matplotlib - users
Can you describe what you want to do? So you now want a histogram?
surfcast23 wrote:
Sorry everyone I totally missed something very important. What I need to
do is first bin the masses(which I don't know how to do).
Chelonian wrote:
On Thu, Aug 25, 2011 at 10:01 PM, surfcast23
Hi,
Well the first bit about wanting a specific column and the last bit about
not wanting to print all the data in and read it back, you get that from the
example I gave you. If you paste what I wrote for you line by line it should
become clearer for you, additionally it avoids you have to write
again
Khary
mdekauwe wrote:
Hi,
Well the first bit about wanting a specific column and the last bit about
not wanting to print all the data in and read it back, you get that from
the example I gave you. If you paste what I wrote for you line by line it
should become clearer
it was 5.57.
mdekauwe wrote:
still don't quite get this, so you want for each column the average? and
you want to plot each of these averages? So a bar graph? with 8 bars?
surfcast23 wrote:
Hi,
I apologize if my explanation was less than clear. What I have is
data in a column
I wasn't quite able to follow exactly what you wanted to do but maybe this
will help. I am going to generate some data that I think sounds a bit like
yours, write it to a file, clearly you already have this. Then I am going to
read it back in and plot it, e.g.
import matplotlib.pyplot as plt
Hi
from what I can see if I call fig.autofmt_xdate() with a the twinx command
the xaxis labels do not roatate as you might expect. There seem to be a few
threads on this e.g.
http://old.nabble.com/autofmt_xdate()-broken-for-twinx()-p30248577.html
However does anyone know a workaround until
Here is a solution which doesn't really use matplotlib, however it is a work
around by interfacing with the R library. Personally I didn't like some of
the colour choices which are hardwired in the R code so I adjusted the R
code and re-compiled, however this assumes the code is as it comes from
Hi thanks for the link thats interesting though I would perhaps rather not
learn a new set of commands just for one plot. Though it seems from my
searching that this might be the only route!
cheers,
Martin
Arthur M. Greene wrote:
On 12/09/2010 05:42 PM, mdekauwe wrote:
Hi,
Has anyone
Hi,
thanks to Juan for the Rpy package suggestion
I came up with this, which at least produces the plot. I can't quite work
out R specific bits at the moment (e.g. legend), but perhaps it might help
someone else.
#!/usr/bin/env python
import sys
from rpy2.robjects.packages import importr
Hi,
Has anyone ever managed to draw a taylor diagram in Matplotlib? For example
like this
http://www.mathworks.com/matlabcentral/fx_files/20559/2/taylordiag_fig.jpg
Cheers,
Martin
--
View this message in context:
http://old.nabble.com/Taylor-diagram-tp30421393p30421393.html
Sent from the
Hi,
I have my backend set up in my .matplotlib/matplotlibrc file as:
backend : MacOSX
However if I run a script which does multiple plots and I don't ask the
script to display the plots (i.e. not imshow()), I still get blank windows
popping up. Does anyone else have this problem? Any
if it relates to the choice
of backend
thanks
John Hunter-4 wrote:
On Nov 11, 2010, at 4:15 AM, mdekauwe mdeka...@gmail.com wrote:
Hi,
I have my backend set up in my .matplotlib/matplotlibrc file as:
backend : MacOSX
However if I run a script which does multiple plots and I
OK thanks so perhaps I should also try another backend then? What do other
mac users opt for?
ps. that works by the way.
John Hunter-4 wrote:
On Thu, Nov 11, 2010 at 6:32 AM, mdekauwe mdeka...@gmail.com wrote:
It isn't any one script, if you did
import numpy as np
import
Hi,
If I set up a random example and plot it as a contour it seems to work
fine...e.g.
import matplotlb.pyplot as plt
import numpy as np
data2 = np.random.sample((17,16))
x = np.linspace(-1.74, -1.32, 16)
y = np.linspace(15.15, 15.61, 17)
X, Y = np.meshgrid(x, y)
plt.contour(X, Y,
:
On Mon, Sep 13, 2010 at 7:45 AM, mdekauwe mdeka...@gmail.com wrote:
Hi,
If I set up a random example and plot it as a contour it seems to work
fine...e.g.
import matplotlb.pyplot as plt
import numpy as np
data2 = np.random.sample((17,16))
x = np.linspace(-1.74, -1.32, 16)
y = np.linspace
=radians, errcheck=errcheck)
File _proj.pyx, line 56, in _proj.Proj._fwd (src/_proj.c:725)
RuntimeError: Buffer lengths not the same
Benjamin Root-2 wrote:
On Mon, Sep 13, 2010 at 8:21 AM, mdekauwe mdeka...@gmail.com wrote:
Hi,
Well hopefully doing what you suggested correctly...
numrows
Hi Jeff,
many thanks that was exactly the problem!
Martin
Jeff Whitaker wrote:
On 9/13/10 8:02 AM, mdekauwe wrote:
Hi,
Well I tried...
numrows = 17
numcols = 16
ulat, llat, ulon, llon = 15.61, 15.15, -1.32, -1.74
m = Basemap(projection='geos', lon_0=0.0, llcrnrlon=llon
Hi,
I am setting a colourbar where I explictly set the tick intervals. However I
would like to exclude the colour black from this colourbar. The reason for
this is I would like to overplot some contour lines in black, so would like
to make them stand out.
An example...where I would like to
= cm.set_cmap(colourmap)
But it doesn't seem to like the set_cmap command
colourmap = cm.set_cmap(colourmap)
AttributeError: 'module' object has no attribute 'set_cmap'
So I guess that isn't the way, nor I suspect is that all that elegant.
Martin
mdekauwe wrote:
Hi,
I am setting
The solution incase anyone has a similar issue...
data = np.random.randint(0,50,100*100).reshape(100, 100)
m = Basemap(llcrnrlon=1.5, llcrnrlat=10.5, urcrnrlon=3.5, urcrnrlat=13.5,
resolution='c', projection='cyl')
fig = plt.figure(figsize=(8, 6))
ax = fig.add_axes([0.1,
Hi,
Is there a nice way to plot an array where there are say missing days and
you wouldn't want the line to join over these data gaps, i.e. show the gaps.
E.g.
1 4.5
2 4.6
4 6.7
8 5.7
9 1.2
The only way I could think to get around this involved appending NaNs and
then masking the array, but
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
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
then be used in
the contour call?
I hope that makes sense.
Thanks again.
Jeff Whitaker wrote:
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
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
portions of Makefiles... no
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: in
`/Users/mdekauwe/src/packages/matplotlib_svn/libpng-1.2.39':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make: *** [png] Error 77
I
Do you have some notes on how you achieved this? It is more than I've
been able to do.
Yes I firstly setup a brand new python, i.e. not the one that ships with
snow leopard (ver2.6.5). Then followed everything on
http://blog.hyperjeff.net/?p=160
I'm not a build or gcc expert, but am
This doesn't solve the original problem and I know I worked out a way to do
it before my hard disk messed up! But it seems you can get a version going
through macports...
sudo port install py26-matplotlib
sudo port install python_select
sudo python_select python26
then edit your
Hmm OK thanks. It seems I am using
In [3]: matplotlib.__version__
Out[3]: '0.98.5.3'
so by the sounds of it an outdated version? But your example will work on a
newer version?
What version of matplotlib are
([0.1, 0.1, 0.7, 0.7])
?
Thanks
Jae-Joon Lee wrote:
On Thu, Jun 10, 2010 at 9:28 AM, mdekauwe mdeka...@gmail.com wrote:
so by the sounds of it an outdated version? But your example will work on
a
newer version?
I think bbox_inches option is not supported with your version of
matplotlib
.
Benjamin Root-2 wrote:
Just to make sure, were you calling subplots_adjust() *before* calling
subplot()? Calling it after subplot() shouldn't have an effect on the
already created axes (I think...).
Ben Root
On Thu, Jun 10, 2010 at 3:41 PM, mdekauwe mdeka...@gmail.com wrote:
Unless I am
that is just my eyes!
http://old.nabble.com/file/p28848239/diffmap_JULES_DJF_snowFrac.GSWP2_vs_SSMI.jpeg
Jae-Joon Lee wrote:
On Thu, Jun 10, 2010 at 1:55 PM, mdekauwe mdeka...@gmail.com wrote:
fig = plt.figure(figsize=(8, 6))
This.
Also play with subplots_adjust.
-JJ
Hi,
when I make plots with the Basemap package I seem to be getting a large
amount of white space at the top and bottom of the plot, even if I use the
option bbox_inches='tight'. Does anyone know how I can stop this happening?
Example image...
Note - in case it isn't clear that white space between where I mention the
example and the image is what I am referring to and below it again.
mdekauwe wrote:
Hi,
when I make plots with the Basemap package I seem to be getting a large
amount of white space at the top and bottom
Hi,
I am trying to plot a 2D array which contains some NaN values as a map. I
would like to be able to control the colours assigned to these data points.
At the moment it seems that there are given the same colour as the highest
value in the array. Any suggestions would be appreciated. Although
Note
palette.set_bad ('w',1.0) # Bad values (i.e., masked, set to white!)
mdekauwe wrote:
Problem solved thanks to Jose.
For interest...
import numpy as np
import matplotlib.pyplot as plt
a = np.array([[1,2,3,np.nan,5],[4,22,np.nan,11,9]])
palette = plt.cm.jet
palette.set_bad ('w
(A,interpolation='nearest',cmap=palette)
plt.show()
mdekauwe wrote:
Hi,
I am trying to plot a 2D array which contains some NaN values as a map. I
would like to be able to control the colours assigned to these data
points. At the moment it seems that there are given the same colour
43 matches
Mail list logo