=zeros(5)
>>> a_sampled
array([ 0., 0., 0., 0., 0.])
>>> range(0,15,5)
[0, 5, 10]
>>> range(0,15,3)
[0, 3, 6, 9, 12]
>>> fileter_indecies=range(0,15,3)
>>> for i in range(len(a_sampled)):
... a_sampled[i]=a[fileter_indecies[i]]
...
>>> a_sampled
arra
far I have managed to plot the graph with invert x axis, but I don't know
how to change the default graph option of intercept of axes in the bottom
left corner.
So I hope I made my question clear: how can I plot a graph with intecept of
axes in the upper left corner ?
Thanks,
Oz
ticklabels', [])
> subplot(111)
> ax=twiny()
> y = [1, 2, 3, 4]
> x = [5, 4, 2, 2]
> plot(x, y, 'ro-')
> ylim(5,0)
> xlim(1,6)
> ax.xaxis.tick_top()
> xlabel('Y')
> ylabel('X')
> show()
>
>
> On Fri, Jun 13, 2008 at 10:24
Hi,
I want to draw a contour plot which uses data from files. I know how to
import the files, so it's not the main issue.
Let's say I want to do a profile which has the following data:
distance, depth and some oceanographic data like temp, oxygen and stuff
so for simplicity lets say I have:
d
e the possibly dumb question, I am new to sceintific programming and
for matplotlib
Oz
On Wed, Jul 16, 2008 at 7:51 PM, Eric Firing <[EMAIL PROTECTED]> wrote:
> Oz Nahum wrote:
>
>> Hi,
>> I want to draw a contour plot which uses data from files. I know how to
>> import th
, Eric Firing <[EMAIL PROTECTED]> wrote:
> Oz Nahum wrote:
>
>> Thanks for the quick answer.
>> So if I have a series of 18 points withe measured distance, and 18 data
>> points with distance, it makes it almost impossible to build the graph ??? I
>> can't typ
where I'm wrong ?
thanks, Oz
On Wed, Jul 16, 2008 at 9:37 PM, Eric Firing <[EMAIL PROTECTED]> wrote:
> Oz Nahum wrote:
>
>> Ok, I played with it a little bit.
>>
>> Here is what I know:
>> importing the data is not a big issue, I aready wrote a tutorial about it
&g
plt.colorbar(m)
import numpy as np
X, Y = np.meshgrid(x,y)
#plt.hold(True) # probably not necessary
plt.plot(X,Y, 'o')
plt.show(m)
On Wed, Jul 16, 2008 at 10:28 PM, Eric Firing <[EMAIL PROTECTED]> wrote:
> Oz Nahum wrote:
>
>> Hi Eric,
>> really thanks for your help
>You can transpose your inputs. For numpy arrays: x = x.transpose()
i wrote:
for np arrays: x = x.transpose()
but I still get a syntax error.
> > Also, one more thing, I can't find how to expand the borders of the plot,
> > say from 350 to 400
> > (same for depth) I tried usig xlim and ylim(0
I wrote my own little tutorial here
http://www.tabula0rasa.org/?p=21
but that's not enough.
sorry about making so much fuss in the mailing list and crying my hearts
out, but I thought since I know python it's worth trying this and not
mathlab
Oz
On Wed, Jul 16, 2008 at 11:20 PM, John Hunter <[EMAIL PROT
king about this
young dolphin that keeps swimming around the reef here (I am in Eilat,
northren tip of Gulf of Aqaba).
Anyways, many thanks for you people trying to help.
Oz.
On Thu, Jul 17, 2008 at 12:12 AM, Michael Droettboom <[EMAIL PROTECTED]>
wrote:
> Oz Nahum wrote:
>
>
So, after mailing all the previous mails, I've thought maybe I'm not asking
the right question.
What I want to do plot is a cross section, and there is no easy way to
extrapulate between points. Not in excell and not in matlab.
here is a simplification:
I'm trying again to understand how to plot scattered data from array into
contour graph.
I looked at
http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
and I understand I have to grid my data. However, in most samples the plot
is of a function.
Let's say I w
alues are automatically chosen in this example but you can
> provide the number of values or a sequence of them.
>
> Note that no extrapolation is done outside convex hull defined by input
> data.
>
> Goyo
>
> El sáb, 20-09-2008 a las 11:13 +0200, Oz Nahum escribió:
&g
>¿What's the meaning of that data arrange? I can't make any sense of
>plotting a 2D scatter from a 3D array.
when I wrote:
head = [[0,0,10],
[1,0,13],
[2,0,11],
[3,0,12],
[1,2,11]]
my meaning was to represent
Hello,
I'm having troubles understand something about regression coefficients.
If I have two vectors:
x = [1.38, 1.98, 3.18, 3.56, 4.9, 6.21, 6.44, 7.47, 8.36, 8.81]
y = [8.19, 17.77, 20.12, 14.55, 20.17 ,31.22 ,28.94, 34.79, 40.26, 38.99]
and I would like to find out the regression coefficient
I'm answering to myself on the mailing list just in case it might help some
in the future.
As, someone pointed out the error is in the assignment operator:
I wrote in the code:
sum1 =+ (i-mx)*(j-my)
which does not add the values but puts them.
Instead I should have wrote
sum1 += (i-mx)
Hi,
I can't find a way to do a logarithmic regression in matplotlib,
This can be done relatively easily in spread sheets like gnumeric and excel.
Has anyone got a clue how to do it ?
Thanks, Oz.
--
Imagine there's no countries
It isn't hard to do
Nothing to
>but you should be able to adapt the example below to your needs. This
example shows how to fit a
> gaussian to some noisy data.
This sure helps, thanks.
> I don't know if scipy has a logarithmic regression predefined,
so my question still stands. I'm still interested in logarithmic regression.
I
v=N.arange(1.15,1.18,0.002)
CS=contourf(x,z,som,cmap=cm.pink_r)
cb=colorbar(CS, orientation='horizontal', shrink=1.0,aspect=33)
ax1.set_title("SOM "+titles[i])
savefig('Fig'+str(i)+'.png')
Thanks in advance !
--
Oz Nahum
Graduate Student
Ze
Hi,
I wanted to be more clear:
the numbers on my figure's color bar range from 0 to 1.7,
but mpl writes the following numbers:
0., 0.000250,0.50,0.000750,
etc.
This is totally not somthing I can use, it looks horrible.
I'm also attaching the image ...
--
Oz Nahum
Gradua
found a solution after 2 hours ...
colorbar(ax=ax1, orientation='horizontal',format='%.3f')
now, I need to know how to set up limits for all the images which are
exactly the same limits.
So far I'm failing with the use of "boundaries"
....
Would be happy to
ings you can do with the
> colormap that are more generic to all plotting functions as well, but I
> would see if using vmin and vmax does the trick for you.
>
> Ben Root
>
> On Mon, May 31, 2010 at 7:25 PM, Oz Nahum wrote:
>
>> found a solution after 2 hours ...
>>
et the min and maximum values for the
>> colorscale. There are some more complicated things you can do with the
>> colormap that are more generic to all plotting functions as well, but I
>> would see if using vmin and vmax does the trick for you.
>>
>> Ben Root
>>
On Mon, May 31, 2010 at 6:01 PM, Oz Nahum wrote:
> I now get something really ugly
>
> the labels are 1.164E+00
>
> would be great to remove the + sign, if I can only do 1.164E0
>
> it's the best
>
>
> On Mon, May 31, 2010 at 5:55 PM, Andre Walker-Loud wr
:
cb=colorbar(ax=ax1, orientation='horizontal',format='%.e')
and then with:
cb.ax.get_xmajorticklabels
i get:
>
But do I actually modify this list I have no clue...
Would be happy to know if somebody knows
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geolog
Hi Everyone,
I'd like to know, what is the underline mechanism that connects the points
of my gridded data when I use
contour().
Can I control this mechanism ?
Maybe I missed it in the documentation, but it's not clear to me.
Thanks in advance,
--
Oz Nahum
Graduate Student
Z
Hi Eric,
Thanks for your reply. I've already suspected that it's a simple linear
interpolation like in matlab.
And for better interpolation I should use griddata on a finer grid. That's
all clear now !
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Unive
python2.6/dist-packages/pytz/__init__.py", line 32, in
from pkg_resources import resource_stream
ValueError: bad marshal data
[/code]
I am using python-matplotlib on Debian Squeeze.
Any help would be appreciated !
Thanks,
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Univ
ׁHi,
Sorry for the late reply.
Yes the solution suggested in reply to my bug report was indeed helpful !
Thanks for the help !
Oz
On Wed, Aug 4, 2010 at 5:01 PM, Benjamin Root wrote:
> On Wed, Aug 4, 2010 at 12:26 AM, Oz Nahum wrote:
>
>> Hi Everyone !
>> This is urgent
ape(10, 10)
print A
A=A/1.0
print A
fig = PLT.figure()
ax1 = fig.add_subplot(111)
cax = ax1.pcolormesh(A)#, interpolation="nearest")
# set the tickmarks *if* you want cutom (ie, arbitrary) tick labels:
cbar = fig.colorbar(cax, ticks=[0, 0.0001, 0.0002])
# note: 'ax' is not th
not straight forward to understand, I hope my question will be a good
answer for others...
Cheers,
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And no religion to
Would be great if someone could tell me how to do the 2 other things ...
Many thanks
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And no religion too
Imagine
, or at
least changed the to be non-visible, still stands...
Thanks,
Oz
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And
I am not familiar with it. Anyway, to get rid of the box
> around the colorbar, the colorbar object has a member attribute called
> "outline" which you can set_visible(False).
>
> a = plt.colorbar()
> a.outline.set_visible(False)
>
> Should do the trick for that par
_init
trans = self._set_transform()
File "/usr/lib/pymodules/python2.6/matplotlib/quiver.py", line 481, in
_set_transform
raise ValueError('unrecognized units')
ValueError: unrecognized units
Can someone point to where am I mistaken ? Is it a mistake in the
d
Hi Ryan
Thanks for your reply.
I am using 0.99.3 from Debian ...
On Wed, Sep 15, 2010 at 3:18 PM, Ryan May wrote:
> On Wed, Sep 15, 2010 at 7:27 AM, Oz Nahum wrote:
> > Hi Everyone,
> >
> > I'm trying to make a quiver plot using the example in examples
> coll
et_text()
Out[12]: u'0.0
As can be seen, the text string is empty before calling show, which is
forcing me to show the image . Is there a way to access these labales with
out calling show() ?
Thanks in advance,
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübing
take
label[:-2] and glue it to label[-1], which will give me
"1.1E+1"
I would be greatful if someone showed me how to access that string.
Cheers,
Oz
On Thu, Sep 23, 2010 at 3:37 PM, Ryan May wrote:
> On Thu, Sep 23, 2010 at 3:49 AM, Oz Nahum wrote:
> > Hi Everyone,
> >
.0003,.0004,.0005]
x=[1,2,3,4,5]
ax.plot(x,y)
ax.yaxis.set_major_formatter(NiceSciFormatter())
show()
Cheers ,
Oz
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And n
!
Cheers,
Oz
On Thu, Sep 23, 2010 at 5:10 PM, Ryan May wrote:
> On Thu, Sep 23, 2010 at 8:52 AM, Oz Nahum wrote:
> > Hi Ryan,
> >
> > Thanks for your answer. However, I don't understand from the existing
> > documentation how to use tickers.
> >
> &
arabic or hebrew letters I get Bricks displays.
Thanks in advance,
Oz
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
Nothing to kill or die for
And no religion too
Ima
l.pdf',papertype='a4', orientation='portrait')
Good to know someone close is also using it :-)
Viele Gruesse aus Tuebingen ;-)
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universität Tübingen
---
Imagine there's no countries
it isn't hard to do
No
Hi Steven,
First let me say, your question is great. It is humble and great too.
Then, I would say, just do it. Sorry for the cliché, but
programming is a lot of trial and error. If you don't do, you will not make
errors, and you will not learn.
But lucky for you, you live in the age of Internet.
(ax1, ax2, ax3, ax4) = subplots(2, 2, sharey=True)
ValueError: need more than 2 values to unpack
I got over with with a small modification:
f, ((ax1,ax2),(ax3,ax4)) = subplots(2, 2, sharey=True)
Which now worked !
Cheers,
--
Oz Nahum
Graduate Student
Zentrum für Angewandte Geologie
Universitä
Hi MicDup,
Try using in your script show(mainloop=True) - if your matplotlib is 1.0.0
Cheers,
--
Oz Nahum
---
"Gentlmen! You can't fight in here, this is the War Room!"
President Merkin Muffley
(Peter Sellers,
46 matches
Mail list logo