Re: [Matplotlib-users] drawing a box

2007-12-18 Thread John Hunter
On Dec 18, 2007 9:47 PM, Bryan Fodness <[EMAIL PROTECTED]> wrote:
> I do want a rectangle.  And, I have tried,
>
> axvline(x=x1, ymin=y1, ymax=y2)
> axvline(x=x2, ymin=y1, ymax=y2)
> axhline(y=y1, xmin=x1, xmax=x2)
> axhline(y=y2, xmin=x1, xmax=x2)
>

You can either use the plot function "fill"


In [1]: xs = [0, 0, 1, 1]

In [2]: ys = [0, 2, 2, 0]

In [3]: fill(xs, ys)
Out[3]: []

or create a matplotlib.patches.Rectangle instance, eg
http://matplotlib.sf.net/examples/alignment_test.py

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] drawing a box

2007-12-18 Thread Bryan Fodness
I do want a rectangle.  And, I have tried,

axvline(x=x1, ymin=y1, ymax=y2)
axvline(x=x2, ymin=y1, ymax=y2)
axhline(y=y1, xmin=x1, xmax=x2)
axhline(y=y2, xmin=x1, xmax=x2)

On Dec 18, 2007 10:40 PM, John Hunter <[EMAIL PROTECTED]> wrote:

> On Dec 18, 2007 9:00 PM, Bryan Fodness <[EMAIL PROTECTED]> wrote:
> > I would like to draw a polygon using a x1, x2, y1, and y2.
>
> At a minimum, x1, x2, y1, and y2 define a line segment, or at most a
> rectangle.  You say a "polygon".  What exactly do you mean, and what
> have you tried (code please)?
>
> JDH
>



-- 
"The game of science can accurately be described as a never-ending insult to
human intelligence." - João Magueijo
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] drawing a box

2007-12-18 Thread John Hunter
On Dec 18, 2007 9:00 PM, Bryan Fodness <[EMAIL PROTECTED]> wrote:
> I would like to draw a polygon using a x1, x2, y1, and y2.

At a minimum, x1, x2, y1, and y2 define a line segment, or at most a
rectangle.  You say a "polygon".  What exactly do you mean, and what
have you tried (code please)?

JDH

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] drawing a box

2007-12-18 Thread Bryan Fodness
I would like to draw a polygon using a x1, x2, y1, and y2.

I tried to use axhline and axvline with the min and max values but it does
give the desired result.  It changes the axis limits and does not draw a
line at all.

Any help would be appreciated.
Bryan

-- 
"The game of science can accurately be described as a never-ending insult to
human intelligence." - João Magueijo
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] LaTeX preamble & Verbose errors in 0.91.1

2007-12-18 Thread Darren Dale
On Tuesday 18 December 2007 10:55:36 am Peter-Jan Randewijk wrote:
> Darren,
>
> Thanks for the quick reply...  It works like a charm...  Somehow I
> missed the post in the userslist...

You're off the hook :) It was posted at the sourceforge bugtracker, not on the 
mailing list.

> Op 2007/12/18 17:25, het Darren Dale die volgende geskryf:
> > Somebody reported it right after 0.91.1 was released. It has been fixed
> > in svn. To hold you over until the next release, I think you just need to
> > update your matplotlib/__init__.py and matplotlib/rcsetup.py.
> >
> > On Tuesday 18 December 2007 10:07:28 am Peter-Jan Randewijk wrote:
> >> Dear Darren,
> >>
> >> I know "text.latex.preamble" is not supported, but since I upgraded to
> >> Matplotlib 0.91.1 my latex preamble code which was working perfectly
> >> well in 0.90.1, now gives my the follow errors (both on openSUSE & XP):
> >>
> >> In [1]: run overlap_vs_concentrated.py
> >> C:\Python\lib\site-packages\matplotlib\__init__.py:606: UserWarning: Bad
> >> val "\u
> >> sepackage[cmex10]{amsmath},\usepackage{helvet},\usepackage{sansserifmath
> >>}" on li
> >> ne #128
> >> "text.latex.preamble   :
> >> \usepackage[cmex10]{amsmath},\usepackage{he
> >> lvet},\usepackage{sansserifmath}
> >> "
> >> in file "c:\My Documents\My
> >> Publications\PEDS-2007\Paper_I\Presentation\
> >> python\matplotlibrc"
> >> global name 'verbose' is not defined
> >>   "%s"\n\t%s' % (val, cnt, line, fname, msg))
> >>
> >> Has the syntax changed... or is this a bug...?
> >>
> >> I also get this error message w.r.t. to "verbose" which isn't critical
> >> but annoying...
> >>
> >> Kind regards,
> >>
> >> Peter-Jan
> >>
> >> Op 2007/05/18 18:05, het Alexander Schmolck die volgende geskryf:
> >>> Darren Dale <[EMAIL PROTECTED]> writes:
> > Well, if ever there was a compelling use-case for an
> > undocumented/unsupported feature it would be this one, I think.
> 
>  Alright, svn 3277 lets you add additional commands to the preamble:
> 
>  text.latex.preamble : \usepackage{bm},\renewcommand{etc...}
> 
>  See the default matplotlibrc file for more information.
> 
>  THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl
>  mailing lists without submitting a patch to fix them.
> 
>  Alex, please give this a spin. Tell me if it meets your needs, and if
>  it doesnt, send a patch.
> >>>
> >>> Great! Thanks for incorporating this! It fits my needs, but I sent a
> >>> (mostly unreleated) patch anyway (against 3278) :)
> >>>
> >>> cheers,
> >>>
> >>> 'as
> >>>
> >>> ---
> >>>-- This SF.net email is sponsored by DB2 Express
> >>> Download DB2 Express C - the FREE version of DB2 express and take
> >>> control of your XML. No limits. Just data. Click to get it now.
> >>> http://sourceforge.net/powerbar/db2/
> >>> ___
> >>> Matplotlib-users mailing list
> >>> Matplotlib-users@lists.sourceforge.net
> >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-- 
Darren S. Dale, Ph.D.
Staff Scientist
Cornell High Energy Synchrotron Source
Cornell University
275 Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

[EMAIL PROTECTED]
office: (607) 255-3819
fax: (607) 255-9001
http://www.chess.cornell.edu

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] LaTeX preamble & Verbose errors in 0.91.1

2007-12-18 Thread Peter-Jan Randewijk
Darren,

Thanks for the quick reply...  It works like a charm...  Somehow I 
missed the post in the userslist...

Kind regards,

Peter-Jan

Op 2007/12/18 17:25, het Darren Dale die volgende geskryf:
> Somebody reported it right after 0.91.1 was released. It has been fixed in 
> svn. To hold you over until the next release, I think you just need to update 
> your matplotlib/__init__.py and matplotlib/rcsetup.py.
>
> On Tuesday 18 December 2007 10:07:28 am Peter-Jan Randewijk wrote:
>   
>> Dear Darren,
>>
>> I know "text.latex.preamble" is not supported, but since I upgraded to
>> Matplotlib 0.91.1 my latex preamble code which was working perfectly
>> well in 0.90.1, now gives my the follow errors (both on openSUSE & XP):
>>
>> In [1]: run overlap_vs_concentrated.py
>> C:\Python\lib\site-packages\matplotlib\__init__.py:606: UserWarning: Bad
>> val "\u
>> sepackage[cmex10]{amsmath},\usepackage{helvet},\usepackage{sansserifmath}"
>> on li
>> ne #128
>> "text.latex.preamble   :
>> \usepackage[cmex10]{amsmath},\usepackage{he
>> lvet},\usepackage{sansserifmath}
>> "
>> in file "c:\My Documents\My
>> Publications\PEDS-2007\Paper_I\Presentation\
>> python\matplotlibrc"
>> global name 'verbose' is not defined
>>   "%s"\n\t%s' % (val, cnt, line, fname, msg))
>>
>> Has the syntax changed... or is this a bug...?
>>
>> I also get this error message w.r.t. to "verbose" which isn't critical
>> but annoying...
>>
>> Kind regards,
>>
>> Peter-Jan
>>
>> Op 2007/05/18 18:05, het Alexander Schmolck die volgende geskryf:
>> 
>>> Darren Dale <[EMAIL PROTECTED]> writes:
>>>   
> Well, if ever there was a compelling use-case for an
> undocumented/unsupported feature it would be this one, I think.
>   
 Alright, svn 3277 lets you add additional commands to the preamble:

 text.latex.preamble : \usepackage{bm},\renewcommand{etc...}

 See the default matplotlibrc file for more information.

 THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl
 mailing lists without submitting a patch to fix them.

 Alex, please give this a spin. Tell me if it meets your needs, and if it
 doesnt, send a patch.
 
>>> Great! Thanks for incorporating this! It fits my needs, but I sent a
>>> (mostly unreleated) patch anyway (against 3278) :)
>>>
>>> cheers,
>>>
>>> 'as
>>>
>>> -
>>> This SF.net email is sponsored by DB2 Express
>>> Download DB2 Express C - the FREE version of DB2 express and take
>>> control of your XML. No limits. Just data. Click to get it now.
>>> http://sourceforge.net/powerbar/db2/
>>> ___
>>> Matplotlib-users mailing list
>>> Matplotlib-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>   

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] LaTeX preamble & Verbose errors in 0.91.1

2007-12-18 Thread Darren Dale
Somebody reported it right after 0.91.1 was released. It has been fixed in 
svn. To hold you over until the next release, I think you just need to update 
your matplotlib/__init__.py and matplotlib/rcsetup.py.

On Tuesday 18 December 2007 10:07:28 am Peter-Jan Randewijk wrote:
> Dear Darren,
>
> I know "text.latex.preamble" is not supported, but since I upgraded to
> Matplotlib 0.91.1 my latex preamble code which was working perfectly
> well in 0.90.1, now gives my the follow errors (both on openSUSE & XP):
>
> In [1]: run overlap_vs_concentrated.py
> C:\Python\lib\site-packages\matplotlib\__init__.py:606: UserWarning: Bad
> val "\u
> sepackage[cmex10]{amsmath},\usepackage{helvet},\usepackage{sansserifmath}"
> on li
> ne #128
> "text.latex.preamble   :
> \usepackage[cmex10]{amsmath},\usepackage{he
> lvet},\usepackage{sansserifmath}
> "
> in file "c:\My Documents\My
> Publications\PEDS-2007\Paper_I\Presentation\
> python\matplotlibrc"
> global name 'verbose' is not defined
>   "%s"\n\t%s' % (val, cnt, line, fname, msg))
>
> Has the syntax changed... or is this a bug...?
>
> I also get this error message w.r.t. to "verbose" which isn't critical
> but annoying...
>
> Kind regards,
>
> Peter-Jan
>
> Op 2007/05/18 18:05, het Alexander Schmolck die volgende geskryf:
> > Darren Dale <[EMAIL PROTECTED]> writes:
> >>> Well, if ever there was a compelling use-case for an
> >>> undocumented/unsupported feature it would be this one, I think.
> >>
> >> Alright, svn 3277 lets you add additional commands to the preamble:
> >>
> >> text.latex.preamble : \usepackage{bm},\renewcommand{etc...}
> >>
> >> See the default matplotlibrc file for more information.
> >>
> >> THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl
> >> mailing lists without submitting a patch to fix them.
> >>
> >> Alex, please give this a spin. Tell me if it meets your needs, and if it
> >> doesnt, send a patch.
> >
> > Great! Thanks for incorporating this! It fits my needs, but I sent a
> > (mostly unreleated) patch anyway (against 3278) :)
> >
> > cheers,
> >
> > 'as
> >
> > -
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-- 
Darren S. Dale, Ph.D.
Staff Scientist
Cornell High Energy Synchrotron Source
Cornell University
275 Wilson Lab
Rt. 366 & Pine Tree Road
Ithaca, NY 14853

[EMAIL PROTECTED]
office: (607) 255-3819
fax: (607) 255-9001
http://www.chess.cornell.edu

-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] LaTeX preamble & Verbose errors in 0.91.1

2007-12-18 Thread Peter-Jan Randewijk

Dear Darren,

I know "text.latex.preamble" is not supported, but since I upgraded to 
Matplotlib 0.91.1 my latex preamble code which was working perfectly 
well in 0.90.1, now gives my the follow errors (both on openSUSE & XP):


In [1]: run overlap_vs_concentrated.py
C:\Python\lib\site-packages\matplotlib\__init__.py:606: UserWarning: Bad 
val "\u
sepackage[cmex10]{amsmath},\usepackage{helvet},\usepackage{sansserifmath}" 
on li

ne #128
   "text.latex.preamble   : 
\usepackage[cmex10]{amsmath},\usepackage{he

lvet},\usepackage{sansserifmath}
"
   in file "c:\My Documents\My 
Publications\PEDS-2007\Paper_I\Presentation\

python\matplotlibrc"
   global name 'verbose' is not defined
 "%s"\n\t%s' % (val, cnt, line, fname, msg))

Has the syntax changed... or is this a bug...?

I also get this error message w.r.t. to "verbose" which isn't critical 
but annoying...


Kind regards,

Peter-Jan

Op 2007/05/18 18:05, het Alexander Schmolck die volgende geskryf:

Darren Dale <[EMAIL PROTECTED]> writes:

  

Well, if ever there was a compelling use-case for an
undocumented/unsupported feature it would be this one, I think.
  

Alright, svn 3277 lets you add additional commands to the preamble:

text.latex.preamble : \usepackage{bm},\renewcommand{etc...}

See the default matplotlibrc file for more information.

THIS FEATURE IS NOT SUPPORTED. Please don't report problems on the mpl mailing 
lists without submitting a patch to fix them. 

Alex, please give this a spin. Tell me if it meets your needs, and if it 
doesnt, send a patch.



Great! Thanks for incorporating this! It fits my needs, but I sent a (mostly
unreleated) patch anyway (against 3278) :)

cheers,

'as

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

  
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using strpdate2num in load

2007-12-18 Thread Emmanuel
Yes, I think strpdate2num is based on dateutil.parser.parse thast's why I
tried dayfirst=True which is used with dateutil.parser.parse.


It would be funny if from a list of string, it could be automatically try to
decide between day/month/year, month/day/year format... (it´s a joke)
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] using strpdate2num in load

2007-12-18 Thread Lionel Roubeyrie
Hi Emmanuel,
look at dateutil.parser.parse, there is exactly what you search.

Le mardi 18 décembre 2007, Emmanuel a écrit :
> Ok, thank you!
>
> I'm missing an option to (easily) use date that start with the day
> day/month/year (it is the case in Brazil and France for example)
>
> I'm using something like tha
> date_Ymd="%s/%s/%s" % (datedayfirst.split('/')[2],datedayfirst.split
> ('/')[1],datedayfirst.split ('/')[0])
>
> I was lookigng for sometinh like that :
>
> datestr2num(a,dayfirst=True)
> or
> datestr2num(a,fmt="%d/%m/%Y")
>
> On Dec 11, 2007 11:16 AM, John Hunter <[EMAIL PROTECTED]> wrote:
> > On Dec 11, 2007 6:00 AM, Emmanuel <[EMAIL PROTECTED]> wrote:
> > > Hi,
> > >
> > > I've a little problem with date conversion. I have a csv file which
> >
> > looks
> >
> > > like :
> > > "Data","Valor"
> > > "15/01/2007"," 6,700012000"
> > > "12/01/2007"," 6,659903000"
> > >
> > > "11/01/2007"," 6,701586000"
> > >
> > > I try to get date using function strpdate2num in load doing this :
> >
> > Try stripping the double quote characters from you file.
> >
> > JDH
> >
> > -
> > SF.Net email is sponsored by:
> > Check out the new SourceForge.net Marketplace.
> > It's the best place to buy or sell services for
> > just about anything Open Source.
> > http://sourceforge.net/services/buy/index.php
> > ___
> > Matplotlib-users mailing list
> > Matplotlib-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users



-- 
Lionel Roubeyrie - [EMAIL PROTECTED]
Chargé d'études et de maintenance
LIMAIR - la Surveillance de l'Air en Limousin
http://www.limair.asso.fr


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users