Hi Bala,
On Tuesday 31 March 2009 17:00:59 Bala subramanian wrote:
> Friends,
>
> 1) I want to make a plot of multiple lines. I want to make something like
>
> ./multiplot.py 1.dat 2.dat 3.dat .. n.dat
>
> All files contain two columns and are of same length. plotfile() and load()
> do not tak
I want to plot smooth line between data points (Excel like) and I can do it
with with 2 lines:
a.. Original data points as circles, for instance: plot(x, y, 'bo')
b.. Spline of these points as line: plot(xnew, ynew, 'b-')
The only problem with this is the legend - I get either 'o' or '---' but
Eric Firing schrieb:
> Gregor Thalhammer wrote:
>> Tobias Wood
>> [...]
> [...]
>> I also noticed you used C++ constructs in your code. I think this is
>> not recommended.
>
> Gregor,
>
> Would you elaborate, please, to satisfy my curiosity? The original
> file is C++, so use of C++ constructs i
Hello,
So maybe a couple of images can help.
Using the code
#!/usr/bin/env python
"""
See pcolor_demo2 for a much faster way of generating pcolor plots
"""
from __future__ import division
from pylab import *
def func3(x,y):
return (1- x/2 + x**5 + y**3)*exp(-x**2-y**2)
def func4(x,y):
th
P.Romero wrote:
>
> Hi,
>
> Im having a problem with contourf & basemap;
>
> theres a fairly wide gap showing up around the top&left edges of my plot.
>
> Im trying to do the following:
>
> Import numpy as np
>
> Z=my_data( …)
>
> m=basemap( … )
>
> X,Y=m(*np.meshgrid(Z.lon,Z.lat))
>
> Znp=Z.filled
The easiest solution would be to use a proxy(?) artist.
For example,
l1, = plot(x, y, "bo") # original points
l2, = plot(xnew, ynew, "b-") # interpolated line
l3, = plot(x, y, "bo-") # just for the legend
l3.remove() # remove the line from the axes so that it is not drawn.
legend([ll3
There are a few ways to do that depending on exactly what you want.
From your script, you may just clip your image.
im = imshow(Z, extent=(-1, 1, -1, 1))
im.set_clip_path(Circle((0,0),1, transform=ax.transData))
(Note the use of extent keyword in imshow)
Or,
You can use polar coordinate with p
Hi,
I found a minor bug, feel free to ignore it :) . If the vertical scale
of a plot has numbers ~1E-6 the ylabel won't be visible. Example script:
#---
import matplotlib.pyplot as plt
import numpy as np
x = np.arange(-10.0,10.0,0.1)
plt.plot(x,1E-6*np.si
Chaitanya Krishna writes:
> That is, when I use pylab.ylabel(r'$V [A^{3}]$') I don't get any space
> in between V and [.
Like TeX, matplotlib ignores spaces in math mode and uses spacing
derived from the usual roles of the symbols. You need to use an explicit
command to add space.
> I also trie
On Monday 06 April 2009 20:15:47 Jouni K. Seppänen wrote:
> Chaitanya Krishna writes:
> > That is, when I use pylab.ylabel(r'$V [A^{3}]$') I don't get any space
> > in between V and [.
>
> Like TeX, matplotlib ignores spaces in math mode and uses spacing
> derived from the usual roles of the symbo
Is it possible to create a colorbar with different scales on each side?
Example:
a temperature colorbar with celcius values on the left side and farenheit
values on the right side.
If so, how could this be done?
Please help,
Thanks,
P.Romero
P.Romero wrote:
> Is it possible to create a colorbar with different scales on each side?
>
>
>
> Example:
>
> a temperature colorbar with celcius values on the left side and
> farenheit values on the right side.
>
>
>
> If so, how could this be done?
A colorbar is just an axes object w
P.Romero wrote:
> Jeff,
> I've attached a test script and my data file.
> Unfortunately, the method that Im using to create the data set isn't very
> portable (the data is being imported from an external program), so sending
> my .npz file is the best I can do.
>
> The gaps are about 5 pixels, and
I don't know who I should notify about this, but I've found a fix for simple
animation. If one uses the code found here:
http://matplotlib.sourceforge.net/examples/animation/simple_anim_gtk.html it
works okay, but if you try to move the window it freezes, and you can't use
anything on the toolb
A B writes:
> I have the following code and am wondering whether there is a more
> efficient way to plot multiple curves. Maybe somehow accumulating the
> data into a single variable, then calling plot once ... Thanks for any
> ideas.
>
> for ofile in files:
> d = mlab.csv2rec(ofile, names =
In regards to my previous example, the lambda function magic is unnecessary,
instead of:
gobject.idle_add(lambda iter=animate(): iter.next())
It is simply adequate to do:
gobject.idle_add(animate().next)
Which is much simpler. My apologies for over coding the solution.
-- Nathaniel
--
Hi, P.Romero,
Please let me know if you get this working. I am trying to do the same
type of 2 axes bar chart. but I got error message.
I am using regular bar ().
the following is the email i sent a week ago. Eric, I did use the twinx(),
but it gave errors.
thanks in advance.
Hi, everyone,
j bai wrote:
> Hi, P.Romero,
> Please let me know if you get this working. I am trying to do the same
> type of 2 axes bar chart. but I got error message.
> I am using regular bar ().
> the following is the email i sent a week ago. Eric, I did use the
> twinx(), but it gave errors.
>
Hi,
sorry to bother you. This may be a trivial question for experienced
Matplotlib users. I am trying to install Matplotlib under Windows XP but
with no success. I am not familiar with Python or any of the other packages
and I've never used Matplotlib before. I followed the instructions in the
Mat
A quick but not necessarily accurate answer: Don't use Python 2.6. Use
Python 2.5. I don't think matplotlib has been 'certified' for 2.6 yet.
I suggest
(1) uninstall Python 2.6 and numpy for 2.6.
(2) Install Python 2.5 and numpy for 2.5
(3) Install matplotlib for 2.5
Constantine
0
I'm new to matplotlib and am really enjoying using it. I'm confused by something
though:
If I plot the following linear regression it works as expected.
from pylab import *
x = range(10)
y = range(10)
m,b = polyfit(x, y, 1)
plot(x, y, 'yo', x, m*x+b, '--k')
show()
The following code produces
Juls Night wrote:
> I'm new to matplotlib and am really enjoying using it. I'm confused by
> something
> though:
[...]
> The following code produces an error though (only the length of the vectors
> have
> been changed):
>
> from pylab import *
>
> x = range(11)
> y = range(11)
>
> m,b = polyf
Hello,
I am trying convert a plot written in IDL to Python using matplotlib. So
far, I have managed to show the image on the screen equivalent to its IDL
output. The only problem that I could not figure out matching the colormaps
between them. Please see the results on this png image:
http://img51
Gökhan SEVER wrote:
> Hello,
>
> I am trying convert a plot written in IDL to Python using matplotlib. So
> far, I have managed to show the image on the screen equivalent to its
> IDL output. The only problem that I could not figure out matching the
> colormaps between them. Please see the resu
Eric Firing writes:
>
> Solution: use
> x = arange(11)
> y = arange(11)
>
> Eric
Thanks Eric,
That has solved my problem!
Best, Juls
--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborat
25 matches
Mail list logo