Re: [Matplotlib-users] Plotting multiline graph with large dataset (6 lines, about 30, 000, 000 points total

2010-02-10 Thread Oz Nahum
=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

[Matplotlib-users] Creating an oceanographic profile with matplotlib

2008-06-13 Thread Oz Nahum
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

Re: [Matplotlib-users] Creating an oceanographic profile with matplotlib

2008-06-14 Thread Oz Nahum
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

[Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
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

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
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

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
, 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

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
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

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
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

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
>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

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
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

Re: [Matplotlib-users] ploting a contour graph from data files

2008-07-16 Thread Oz Nahum
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: > >

[Matplotlib-users] ocean profile

2008-07-16 Thread Oz Nahum
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:

[Matplotlib-users] plotting scattered data from array

2008-09-20 Thread Oz Nahum
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

Re: [Matplotlib-users] plotting scattered data from array

2008-09-25 Thread Oz Nahum
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

Re: [Matplotlib-users] plotting scattered data from array

2008-09-25 Thread Oz Nahum
>¿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

[Matplotlib-users] regression coeffiecients

2008-10-25 Thread Oz Nahum
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

Re: [Matplotlib-users] regression coeffiecients

2008-10-26 Thread Oz Nahum
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)

[Matplotlib-users] ploting a logarithmic regression to scattered data ?

2009-01-05 Thread Oz Nahum
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

Re: [Matplotlib-users] ploting a logarithmic regression to scattered data ?

2009-01-06 Thread Oz Nahum
>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

[Matplotlib-users] setting scientific number notation on colorbar

2010-05-31 Thread Oz Nahum
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

Re: [Matplotlib-users] setting scientific number notation on colorbar

2010-05-31 Thread Oz Nahum
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

Re: [Matplotlib-users] setting scientific number notation on colorbar

2010-05-31 Thread Oz Nahum
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

Re: [Matplotlib-users] setting scientific number notation on colorbar

2010-05-31 Thread Oz Nahum
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 ... >>

Re: [Matplotlib-users] setting scientific number notation on colorbar

2010-05-31 Thread Oz Nahum
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 >>

Re: [Matplotlib-users] setting scientific number notation on colorbar

2010-05-31 Thread Oz Nahum
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

[Matplotlib-users] accessing colorbar() list of values

2010-05-31 Thread Oz Nahum
: 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

[Matplotlib-users] which interpolation type is used by contour() ?

2010-06-11 Thread Oz Nahum
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

Re: [Matplotlib-users] which interpolation type is used by contour() ?

2010-06-14 Thread Oz Nahum
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

[Matplotlib-users] Bad Marshal data when importing matplotlib

2010-08-03 Thread Oz Nahum
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

Re: [Matplotlib-users] Bad Marshal data when importing matplotlib

2010-08-04 Thread Oz Nahum
ׁ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

[Matplotlib-users] missing label in colorbar

2010-08-10 Thread Oz Nahum
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

Re: [Matplotlib-users] missing label in colorbar

2010-08-10 Thread Oz Nahum
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

[Matplotlib-users] colorbar questions ...

2010-09-10 Thread Oz Nahum
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

Re: [Matplotlib-users] colorbar questions ...

2010-09-11 Thread Oz Nahum
, 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

Re: [Matplotlib-users] colorbar questions ...

2010-09-14 Thread Oz Nahum
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

[Matplotlib-users] quiver units

2010-09-15 Thread Oz Nahum
_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

Re: [Matplotlib-users] quiver units

2010-09-15 Thread Oz Nahum
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

[Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
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

Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
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, > >

Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
.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

Re: [Matplotlib-users] empty xticklabel before plotting ...

2010-09-23 Thread Oz Nahum
! 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. > > > &

[Matplotlib-users] how to put non-latin text on plots?

2010-09-23 Thread Oz Nahum
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

Re: [Matplotlib-users] Adjusting subplot parameters

2010-09-24 Thread Oz Nahum
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

Re: [Matplotlib-users] How to start when you don't know what to do

2013-01-15 Thread Oz Nahum Tiram
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.

Re: [Matplotlib-users] recipes in the docs

2010-11-05 Thread Oz Nahum Tiram
(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ä

Re: [Matplotlib-users] about show()

2010-12-29 Thread Oz Nahum Tiram
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,