Re: [Matplotlib-users] Formatter dates
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 qw...@hotmail.com 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
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 qw...@hotmail.com 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
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 qw...@hotmail.com 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
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 qw...@hotmail.com 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
Re: [Matplotlib-users] Formatter dates
On Wed, Nov 17, 2010 at 2:29 AM, Tim Åberg qw...@hotmail.com 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