[Matplotlib-users] Help plotting dates

2009-09-08 Thread Armando Serrano Lombillo
Hello, I'm finding it a little difficult to make a plot with dates:

I have an array with 2 columns. The first one is seconds since a certain
date (let's say 8th September, 8:00am). The second one is the variable I
want to plot. The series spans several months so I want to have the major
ticks be months (and have the name of the month printed below) and the minor
ticks be days. I'm sure this is very easy to plot but I don't know how to,
any help?

Armando.
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] download

2009-09-08 Thread Michael Droettboom
I just went in and changed the default file downloads back to correct 
values, but alas, it appears to have no effect.  There is some hints in 
the (many) related SF bugs that there may be a delay associated with 
these settings, so I will check back again at the end of the day.

Mike

On 09/04/2009 05:46 AM, Fabrice Silva wrote:
 Le jeudi 03 septembre 2009 à 20:16 -0500, John Hunter a écrit :

 On Thu, Sep 3, 2009 at 8:04 PM, Alan G Isaacalan.is...@gmail.com  wrote:
  
 The default download from the Matplotlib page
 link to http://sourceforge.net/projects/matplotlib/
 which once again highlights basemap.  (I think
 this was fixed at one point.)

 I'm not seeng this, nor am I seeing basemap settings in the File
 Manager which would trigger this.  Of course, the default download is
 platform specific, which may be why I am not seeing this, so please
 give us as much info as possible about your platform (mainly the OS)

 When I click on the green download button at
 http://sourceforge.net/projects/matplotlib using mac OSX 10.5, I get
 redirected to the mpl 0.99 OSX download::


 https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99/matplotlib-0.99.0-py2.5-macosx10.5.dmg/download
  
 Strangely, the green button points to
 http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99/matplotlib-0.99.0-py2.5-macosx-10.3-i386.egg/download
 when I browse on a linux (debian) machine with epiphany (which uses
 gecko, the firefox engine). Why macosx ?




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] grid on log-plots

2009-09-08 Thread Andreas Fromm
thanks Sebastian,

you are right, your code works here too. But i don't get it work in my 
multi y-axes plot from the matplotlib examples 
(http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes.html). 
Even with linear plots, i get no gridlines.

Any idea, whats wrong here?

minimal code example:
###
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid.parasite_axes import HostAxes, ParasiteAxes

fig = plt.figure(1)
fig.clf()
#plt.grid(True)
host = HostAxes(fig, [0.15, 0.1, 0.65, 0.8])
fig.add_axes(host)

host.plot([0, 10, 100], [0, 10, 100], label='host')

host.grid(True)  #?
host.yaxis.grid(True) #?

host.yaxis.set_scale('log') #?

plt.draw()
plt.show()
###

Greets,
Andreas


Sebastian Busch schrieb:
 from matplotlib.pyplot import *

 plot([1,10,100],[1,10,100])
 grid()

 yscale('log')
 xscale('log')

 works here.

 best,
 sebastian.
   

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Help plotting dates

2009-09-08 Thread Gökhan Sever
On Tue, Sep 8, 2009 at 7:45 AM, Armando Serrano Lombillo arser...@gmail.com
 wrote:

 Hello, I'm finding it a little difficult to make a plot with dates:

 I have an array with 2 columns. The first one is seconds since a certain
 date (let's say 8th September, 8:00am). The second one is the variable I
 want to plot. The series spans several months so I want to have the major
 ticks be months (and have the name of the month printed below) and the minor
 ticks be days. I'm sure this is very easy to plot but I don't know how to,
 any help?

 Armando.



Hello,

You can experiment with the following lines to re-arrange your ticks.

current_axis = gca()
current_axis.xaxis.set_major_formatter()

Similarly set_minor_formatter for x and y axes.

See these links too

http://matplotlib.sourceforge.net/api/dates_api.html
http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html

-- 
Gökhan
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] grid on log-plots

2009-09-08 Thread Jae-Joon Lee
This is a bug in the axes_grid toolkit. As a matter of fact, gridlines
in rectlinear coordinate are not implemented yet.
Unfortunately, I don't see any easy workarounds.

You may use mpl's original axis artists, but some of the functionality
of axes_grid toolkit may be lost.

host.toggle_axisline(False)
host.yaxis.set_ticks_position(left)
host.yaxis.grid()
host.set_yscale(log)

With new spine support in mpl, I think a similar plot can be drawn
without using axes_grid toolkit.

Regards,

-JJ


On Mon, Sep 7, 2009 at 4:37 PM, Andreas Frommanfr...@gmx.de wrote:
 thanks Sebastian,

 you are right, your code works here too. But i don't get it work in my
 multi y-axes plot from the matplotlib examples
 (http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes.html).
 Even with linear plots, i get no gridlines.

 Any idea, whats wrong here?

 minimal code example:
 ###
 import matplotlib.pyplot as plt
 from mpl_toolkits.axes_grid.parasite_axes import HostAxes, ParasiteAxes

 fig = plt.figure(1)
 fig.clf()
 #plt.grid(True)
 host = HostAxes(fig, [0.15, 0.1, 0.65, 0.8])
 fig.add_axes(host)

 host.plot([0, 10, 100], [0, 10, 100], label='host')

 host.grid(True)  #?
 host.yaxis.grid(True) #?

 host.yaxis.set_scale('log') #?

 plt.draw()
 plt.show()
 ###

 Greets,
 Andreas


 Sebastian Busch schrieb:
 from matplotlib.pyplot import *

 plot([1,10,100],[1,10,100])
 grid()

 yscale('log')
 xscale('log')

 works here.

 best,
 sebastian.


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] creating mesh data from xyz data

2009-09-08 Thread Giuseppe Aprea
Hi list,

I have some files with data stored in columns:

x1     y1     z1
x2     y2     z2
x3     y3     z3
x4     y4     z4
x5     y5     z5
...

and I need to make a contour plot of this data using matplotlib. The
problem is that contour plot functions usually handle a different kind
of input:

X=[[x1,x2,x3,x4,x5,x6],
[x1,x2,x3,x4,x5,x6],
[x1,x2,x3,x4,x5,x6],...


Y=[[y1,y1,y1,y1,y1,y1],
[y2,y2,y2,y2,y2,y2],
[y3,y3,y3,y3,y3,y3],.

Z=[[z1,z2,z3,z4,z5,z6],
[z7,z8,zz9,z10,z11,z12],

I usually load data using 3 lists: x, y and z; I wonder if there is
any function which is able to take these 3 lists and return the right
input for matplotlib functions.

cheers

g

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] trouble installing on Vista 64-bit

2009-09-08 Thread Watson, Nathaniel

Hi,
 
I am running Windows Vista 64-bit and have installed matplotlib from 
http://sourceforge.net/projects/matplotlib/ via the Download Now!.  I 
currently have Numpy version 1.3.0 installed in the same location as matplotlib 
(C:\Python26\Lib\site-packages\).  I have tried importing matplotlib, for 
example import matplotlib.pyplotlike in the documented examples and 
unfortunately this does not work for me.  I have searched in site-packages, and 
elsewhere, for files/directories on my computer named matplotlit or pyplot and 
found no hits.  I have even reinstalled matplot lib and still have the same 
problems.  Has anyone else experienced this problem?  
 

 
-Nathan  




--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] grid on log-plots

2009-09-08 Thread Jae-Joon Lee
On Tue, Sep 8, 2009 at 11:51 AM, Yann
Goudardmatplotlib-us...@alleeduweb.eu wrote:
 Hi,

 I have the same behaviour with LocatableAxes. HostAxes, ParasiteAxes and
 LocatableAxes depend on 'mpl_toolkits.axes_grid.axislines.Axes'. It must
 be the matter origin.

Yes, and this was because I forgot to implement some necessary methods.
This is now fixed in the svn trunk. So if you can,please give it a try.

 This another example should draw a grid but does not:

 import wx
 from wx import Frame
 from matplotlib.backends.backend_wxagg import FigureFrameWxAgg,
 FigureCanvasWxAgg
 from matplotlib.figure import Figure
 from mpl_toolkits.axes_grid.axes_divider import LocatableAxes

 fig = Figure((1, 1), 50)
 axes = LocatableAxes(fig, [0, 0, 1, 1])
 # axes.toggle_axisline(False)
 axes.grid(True)
 fig.add_axes(axes)

 app = wx.PySimpleApp()
 my_viewer = FigureFrameWxAgg(-1, fig)
 my_viewer.Show()
 app.MainLoop()

 If you uncomment axes.toggle_axisline(False), it works cause it uses
 normal 'matplolib.axes.Axes' behaviour. It is not a matter for common
 use but if you need 'AxesZero', this trick does not work.

What the toggle_axisline does is simply to make the xaxis and yaxis
(which are responsible for drawing ticks, ticklabels, etc  in the
mainline mpl) visible again, and make axis[bottom] and etc
invisible.
One workaround is to make xaxis and yaxis visible but pnly to draw the
gridlines. Something like below.

ax.toggle_axisline(True)
ax.grid(True)
ax.gridlines.set_visible(False) # this is just to make the code not to
draw gridlines twice in future release of mpl.
ax.xaxis.set_visible(True)
ax.yaxis.set_visible(True)
for t in ax.xaxis.majorTicks + ax.yaxis.majorTicks:
t.gridOn = True
t.tick1On = False
t.tick2On = False
t.label1On = False
t.label2On = False

Let me know if this does not work, or there is a case that this cannot be used.
Regards,

-JJ



 Yann


 On 09/07/2009 10:37 PM, Andreas Fromm wrote:
 thanks Sebastian,

 you are right, your code works here too. But i don't get it work in my
 multi y-axes plot from the matplotlib examples
 (http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes.html).
 Even with linear plots, i get no gridlines.

 Any idea, whats wrong here?

 minimal code example:
 ###
 import matplotlib.pyplot as plt
 from mpl_toolkits.axes_grid.parasite_axes import HostAxes, ParasiteAxes

 fig = plt.figure(1)
 fig.clf()
 #plt.grid(True)
 host = HostAxes(fig, [0.15, 0.1, 0.65, 0.8])
 fig.add_axes(host)

 host.plot([0, 10, 100], [0, 10, 100], label='host')

 host.grid(True)  #?
 host.yaxis.grid(True) #?

 host.yaxis.set_scale('log') #?

 plt.draw()
 plt.show()
 ###

 Greets,
 Andreas


 Sebastian Busch schrieb:

 from matplotlib.pyplot import *

 plot([1,10,100],[1,10,100])
 grid()

 yscale('log')
 xscale('log')

 works here.

 best,
 sebastian.


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users





 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Matplotlib-users mailing list
 Matplotlib-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/matplotlib-users


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] trouble installing on Vista 64-bit

2009-09-08 Thread Alan G Isaac
On 9/8/2009 1:39 PM, Watson, Nathaniel wrote:
 I am running Windows Vista 64-bit and have installed matplotlib from 
 http://sourceforge.net/projects/matplotlib/ via the Download Now!. 

What is the name of the file you downloaded?

Alan Isaac


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users