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

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, Dr. Strangelove

Re: [Matplotlib-users] recipes in the docs

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

Re: [Matplotlib-users] Adjusting subplot parameters

2010-09-24 Thread Oz Nahum
',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 Nothing to kill or die for And no religion

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

2010-09-23 Thread Oz Nahum
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übingen --- Imagine there's no countries it isn't hard to do

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

2010-09-23 Thread Oz Nahum
[-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 rma...@gmail.com wrote: On Thu, Sep 23, 2010 at 3:49 AM, Oz Nahum nahu...@gmail.com wrote: Hi Everyone, I don't like the default

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

2010-09-23 Thread Oz Nahum
=[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 no religion too Imagine all

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

2010-09-23 Thread Oz Nahum
, Oz On Thu, Sep 23, 2010 at 5:10 PM, Ryan May rma...@gmail.com wrote: On Thu, Sep 23, 2010 at 8:52 AM, Oz Nahum nahu...@gmail.com wrote: Hi Ryan, Thanks for your answer. However, I don't understand from the existing documentation how to use tickers. In the past I used the following

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

2010-09-23 Thread Oz Nahum
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 Imagine all the people Living life in peace

[Matplotlib-users] quiver units

2010-09-15 Thread Oz Nahum
in the documentation ? 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 all the people Living life in peace

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

2010-09-14 Thread Oz Nahum
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 part. I hope this helps! Ben Root -- Oz Nahum Graduate Student Zentrum für Angewandte

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

2010-09-11 Thread Oz Nahum
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 no religion too Imagine all the people Living life in peace

[Matplotlib-users] colorbar questions ...

2010-09-10 Thread Oz Nahum
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 all the people Living life in peace

Re: [Matplotlib-users] missing label in colorbar

2010-08-10 Thread Oz Nahum
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 too Imagine all the people Living life in peace

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 ben.r...@ou.edu wrote: On Wed, Aug 4, 2010 at 12:26 AM, Oz Nahum nahu...@gmail.com wrote: Hi Everyone

[Matplotlib-users] Bad Marshal data when importing matplotlib

2010-08-03 Thread Oz Nahum
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 Universität Tübingen --- Imagine there's no countries it isn't

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 Universität Tübingen

[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 Zentrum für

[Matplotlib-users] setting scientific number notation on colorbar

2010-05-31 Thread Oz Nahum
=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 Zentrum für Angewandte Geologie Universität Tübingen --- Imagine there's

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 Graduate Student

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 know -- Oz Nahum Graduate Student

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

2010-05-31 Thread Oz Nahum
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 nahu...@gmail.com wrote: found a solution after 2 hours ... colorbar(ax=ax1, orientation='horizontal',format='%.3f

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

2010-05-31 Thread Oz Nahum
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 nahu...@gmail.com wrote: found a solution after 2 hours ... colorbar(ax=ax1, orientation='horizontal',format='%.3f') now, I need to know how to set up

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

2010-05-31 Thread Oz Nahum
-- 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 all the people Living life in peace

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

2010-02-10 Thread Oz Nahum
) for i in range(len(a_sampled)): ... a_sampled[i]=a[fileter_indecies[i]] ... a_sampled array([ 1., 4., 7., 10., 13.]) I hope it helps -- 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

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. If

[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

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 +=

[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] plotting scattered data from array

2008-09-25 Thread Oz Nahum
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ó: I'm trying again to understand how to plot scattered data from array into contour graph. I looked at http

[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

[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:

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

2008-07-16 Thread Oz Nahum
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 the files, so it's not the main issue. Let's

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 type 18^18 points I want the computer to plot

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

2008-07-16 Thread Oz Nahum
? 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 here: http://www.tabula0rasa.org/?p=21 here is a sample code I

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

2008-07-16 Thread Oz Nahum
= 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 so far. I am doing a quick short course, and I'll do the examples later. I've

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,900)

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

2008-07-16 Thread Oz Nahum
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: I am mostly frustrated with documentation

[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:

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

2008-06-14 Thread Oz Nahum
=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 AM, Oz Nahum [EMAIL PROTECTED] wrote: Hi all, I am trying to plot an oceanographic profile using some ocean data I have

[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 Nahum