[Matplotlib-users] Linecollection, labels

2011-04-13 Thread Tim Åberg


Due to that my first question a couple of day back was a mess i thougth i could 
clear things up.

Is there any way to label the lines using linecollection. In plot there is 
label, example;
plot(x,y,label = "Hello")

But are there any way to do the same thing with linecollection?
If not, is there any eother asy way of creating labels on a line? 

Best regards,
Tim
  --
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Lable lines

2011-04-11 Thread Tim Åberg

Hello!

I have written a temprature logger using mathplotlib, i take in a list of 
multiple lines and print them out with Linecollection, i also supply a list of 
colors. 

Now to the the question, what is the best way (function) to explain to the user 
what line in the graph that correspond to each temprature node.

What im looking for is some sort of function that make a list in the facion;

Green - Node1
  --
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Formatter dates

2010-11-23 Thread Tim Åberg

Thanks for the reply!

Do you know what makes X climb? And can you control its on some way?

// Tim


> From: jdh2...@gmail.com
> Date: Wed, 17 Nov 2010 05:55:04 -0600
> Subject: Re: [Matplotlib-users] Formatter dates
> To: qw...@hotmail.com
> CC: matplotlib-users@lists.sourceforge.net
> 
> On Wed, Nov 17, 2010 at 2:29 AM, Tim Åberg  wrote:
> > Hello!
> >
> > I have now been tampering with a custom formatter and the more i think about
> > it the more i feel there must be a more easy soulution. I have a set of
> > values that are plotted over time (i use date2num, to get the conversion
> > from date to num), i also have a list with dates that corresponds to these
> > values;
> > ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05
> > 10:27:55.913000'], this to not have to do a conversion back, i imagine its
> > the most effective way to do it.
> >
> > Now to the question;
> >
> > The only two values in the datelist that is vital is the first and the last,
> > in between i really just want to have values that corresponds lineary. Thats
> > brings me to resoulution, if the values are far far in between, say weeks or
> > even moth the time (h:s:ms) isnt so important and vice versa.
> >
> > Is there any formatter that do this sort of things? eg. takes in two
> > values(dates) and format it by itself.
> 
> Take a look at this example
> 
> http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html
> 
> It's trying to solve a different but related problem: in financial
> time series you only have data on Monday - Friday, and you don't want
> to plot the gaps on weekends.  So you plot the data linearly with an
> index, and use a custom locator and formatter to set and format the
> ticks.
> 
> JDH
  --
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Formatter dates

2010-11-22 Thread Tim Åberg

Solved it, was thinking backwards again.

From: qw...@hotmail.com
To: matplotlib-users@lists.sourceforge.net
Date: Mon, 22 Nov 2010 09:00:38 +
Subject: Re: [Matplotlib-users] Formatter dates








Thanks for the reply!
I have been looking into it now and thinks i have get the hang of how it works 
rougly. Do you know any way to know the max-value of X straight away?
I have a list of dates that with listlength Y, the X spans from 0 - something. 
So if i could figure out what "something" is i could get the ratio and then 
plot the dates by indexing the ratio times X eg. (Xmax / listlength) * X.

// Tim



> From: jdh2...@gmail.com
> Date: Wed, 17 Nov 2010 05:55:04 -0600
> Subject: Re: [Matplotlib-users] Formatter dates
> To: qw...@hotmail.com
> CC: matplotlib-users@lists.sourceforge.net
> 
> On Wed, Nov 17, 2010 at 2:29 AM, Tim Åberg  wrote:
> > Hello!
> >
> > I have now been tampering with a custom formatter and the more i think about
> > it the more i feel there must be a more easy soulution. I have a set of
> > values that are plotted over time (i use date2num, to get the conversion
> > from date to num), i also have a list with dates that corresponds to these
> > values;
> > ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05
> > 10:27:55.913000'], this to not have to do a conversion back, i imagine its
> > the most effective way to do it.
> >
> > Now to the question;
> >
> > The only two values in the datelist that is vital is the first and the last,
> > in between i really just want to have values that corresponds lineary. Thats
> > brings me to resoulution, if the values are far far in between, say weeks or
> > even moth the time (h:s:ms) isnt so important and vice versa.
> >
> > Is there any formatter that do this sort of things? eg. takes in two
> > values(dates) and format it by itself.
> 
> Take a look at this example
> 
> http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html
> 
> It's trying to solve a different but related problem: in financial
> time series you only have data on Monday - Friday, and you don't want
> to plot the gaps on weekends.  So you plot the data linearly with an
> index, and use a custom locator and formatter to set and format the
> ticks.
> 
> JDH
  

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users   
  --
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Formatter dates

2010-11-22 Thread Tim Åberg

Thanks for the reply!
I have been looking into it now and thinks i have get the hang of how it works 
rougly. Do you know any way to know the max-value of X straight away?
I have a list of dates that with listlength Y, the X spans from 0 - something. 
So if i could figure out what "something" is i could get the ratio and then 
plot the dates by indexing the ratio times X eg. (Xmax / listlength) * X.

// Tim



> From: jdh2...@gmail.com
> Date: Wed, 17 Nov 2010 05:55:04 -0600
> Subject: Re: [Matplotlib-users] Formatter dates
> To: qw...@hotmail.com
> CC: matplotlib-users@lists.sourceforge.net
> 
> On Wed, Nov 17, 2010 at 2:29 AM, Tim Åberg  wrote:
> > Hello!
> >
> > I have now been tampering with a custom formatter and the more i think about
> > it the more i feel there must be a more easy soulution. I have a set of
> > values that are plotted over time (i use date2num, to get the conversion
> > from date to num), i also have a list with dates that corresponds to these
> > values;
> > ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05
> > 10:27:55.913000'], this to not have to do a conversion back, i imagine its
> > the most effective way to do it.
> >
> > Now to the question;
> >
> > The only two values in the datelist that is vital is the first and the last,
> > in between i really just want to have values that corresponds lineary. Thats
> > brings me to resoulution, if the values are far far in between, say weeks or
> > even moth the time (h:s:ms) isnt so important and vice versa.
> >
> > Is there any formatter that do this sort of things? eg. takes in two
> > values(dates) and format it by itself.
> 
> Take a look at this example
> 
> http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html
> 
> It's trying to solve a different but related problem: in financial
> time series you only have data on Monday - Friday, and you don't want
> to plot the gaps on weekends.  So you plot the data linearly with an
> index, and use a custom locator and formatter to set and format the
> ticks.
> 
> JDH
  --
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Formatter dates

2010-11-17 Thread Tim Åberg

I just checked it up, and it had some nice function, the timeseries 
looked nice and maybe i can use it in some way (time_series looked 
interesting) . I dont want to go away from Linecollection way of 
plotting due to its speed or is the timeseries-way a fast way of 
plotting? 



Date: Wed, 17 Nov 2010 09:55:13 +0100
Subject: Re: [Matplotlib-users] Formatter dates
From: pgmdevl...@gmail.com
To: qw...@hotmail.com

Tim, have you tried the scikits.timeseries package? Its plotting capacities, 
albeit limited, may be helpful in your case... 
On Nov 17, 2010 9:31 AM, "Tim Åberg"  wrote:
> 
> Hello!
> 
> I have now been tampering with a custom formatter and the more i think about 
> it the more i feel there must be a more easy soulution. I have a set of 
> values that are plotted over time (i use date2num, to get the conversion from 
> date to num), i also have a list with dates that corresponds to these values;

> ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05 
> 10:27:55.913000'], this to not have to do a conversion back, i imagine its 
> the most effective way to do it. 
> 

> Now to the question; 
> 
> The only two values in the datelist that is vital is the first and the last, 
> in between i really just want to have values that corresponds lineary. Thats 
> brings me to resoulution, if the values are far far in between, say weeks or 
> even moth the time (h:s:ms) isnt so important and vice versa.

> 
> Is there any formatter that do this sort of things? eg. takes in two 
> values(dates) and format it by itself.
> 
> // Tim
> 

  --
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Formatter dates

2010-11-17 Thread Tim Åberg

Hello!

I have now been tampering with a custom formatter and the more i think about it 
the more i feel there must be a more easy soulution. I have a set of values 
that are plotted over time (i use date2num, to get the conversion from date to 
num), i also have a list with dates that corresponds to these values;
['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05 
10:27:55.913000'], this to not have to do a conversion back, i imagine its the 
most effective way to do it. 

Now to the question; 

The only two values in the datelist that is vital is the first and the last, in 
between i really just want to have values that corresponds lineary. Thats 
brings me to resoulution, if the values are far far in between, say weeks or 
even moth the time (h:s:ms) isnt so important and vice versa.

Is there any formatter that do this sort of things? eg. takes in two 
values(dates) and format it by itself.

// Tim
  --
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Linecollection, Dates on X-axis

2010-11-12 Thread Tim Åberg

Thats seems to be what im after, diffrent resolution but that would be a easy 
fix i guess :)
Did you manage to run the example? i got a;

datafile = cbook.get_sample_data('msft.csv', asfileobj=False)
AttributeError: 'module' object has no attribute 'get_sample_data'

error




> Subject: RE: [Matplotlib-users]  Linecollection, Dates on X-axis
> Date: Thu, 11 Nov 2010 13:44:43 +
> From: david.bri...@ubs.com
> To: qw...@hotmail.com
> 
> If I've got you correctly I asked a similar question this morning on
> StackOverflow. They pointed me to -
> http://matplotlib.sourceforge.net/examples/pylab_examples/date_index_for
> matter.html.
> 
> 
> 
> -Original Message-
> From: Tim-- [mailto:qw...@hotmail.com] 
> Sent: Thu 11-Nov-2010 08:54
> To: matplotlib-users@lists.sourceforge.net
> Subject: [Matplotlib-users] Linecollection, Dates on X-axis
> 
> 
> Hello!
> 
> I have written a program that plots values over Time, because it has to
> be
> done(plotted) fast the date_plot didnt fit the bill so i moved over to
> Linecollection and it works like a charm. The only problem i have now is
> that i dont know any easy way to get dates on the x-axis. Any ideas?
> -- 
> View this message in context:
> http://old.nabble.com/Linecollection%2C-Dates-on-X-axis-tp30188192p30188
> 192.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
> 
> 
> 
> --
> Centralized Desktop Delivery: Dell and VMware Reference Architecture
> Simplifying enterprise desktop deployment and management using
> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
> client virtualization framework. Read more!
> http://p.sf.net/sfu/dell-eql-dev2dev
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> Visit our website at http://www.ubs.com 
> 
> This message contains confidential information and is intended only 
> for the individual named. If you are not the named addressee you 
> should not disseminate, distribute or copy this e-mail. Please 
> notify the sender immediately by e-mail if you have received this 
> e-mail by mistake and delete this e-mail from your system. 
> 
> E-mails are not encrypted and cannot be guaranteed to be secure or 
> error-free as information could be intercepted, corrupted, lost, 
> destroyed, arrive late or incomplete, or contain viruses. The sender 
> therefore does not accept liability for any errors or omissions in the 
> contents of this message which arise as a result of e-mail transmission. 
> If verification is required please request a hard-copy version. This 
> message is provided for informational purposes and should not be 
> construed as a solicitation or offer to buy or sell any securities 
> or related financial instruments. 
> 
> UBS Limited is a company limited by shares incorporated in the United 
> Kingdom registered in England and Wales with number 2035362. 
> Registered office: 1 Finsbury Avenue, London EC2M 2PP.  UBS Limited 
> is authorised and regulated by the Financial Services Authority. 
> 
> UBS AG is a public company incorporated with limited liability in 
> Switzerland domiciled in the Canton of Basel-City and the Canton of 
> Zurich respectively registered at the Commercial Registry offices in 
> those Cantons with Identification No: CH-270.3.004.646-4 and having 
> respective head offices at Aeschenvorstadt 1, 4051 Basel and 
> Bahnhofstrasse 45, 8001 Zurich, Switzerland.  Registered in the 
> United Kingdom as a foreign company with No: FC021146 and having a 
> UK Establishment registered at Companies House, Cardiff, with No:  
> BR 004507.  The principal office of UK Establishment: 1 Finsbury Avenue, 
> London EC2M 2PP.  In the United Kingdom, UBS AG is authorised and 
> regulated by the Financial Services Authority.
> 
> UBS reserves the right to retain all messages. Messages are protected 
> and accessed only in legally justified cases. 
  --
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users