SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: stuartornum <st...@mu...> - 2008年08月27日 14:14:28
Hi,
I would like to be able to plot dates along the X axis' with values up the
Y. However Im having problems with the correct format in order to pass to
plot_date().
This is what I have so far: (example)
####################################
List = [ [datetime.datetime(2008, 7, 12, 5, 12)], ['46.8'] ]
plot_date(List[0], List[1])
#####################################
Returns error:
c = numeric.array(data, dtype=tc, copy=True, order=order)
ValueError: setting an array element with a sequence.
#####################################
I have looked at the pylab example for plot_date, however it uses a drange()
to figure out the dates and doesn't show me how to do it one by one.
Thank you for your time. 
-- 
View this message in context: http://www.nabble.com/plot_date%28%29---Correct-format-to-plot-tp19181899p19181899.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
From: Mathieu L. <lep...@gm...> - 2008年08月29日 11:46:25
On Wed, Aug 27, 2008 at 11:14 AM, stuartornum <st...@mu...> wrote:
>
> Hi,
>
> I would like to be able to plot dates along the X axis' with values up the
> Y. However Im having problems with the correct format in order to pass to
> plot_date().
>
> This is what I have so far: (example)
>
> ####################################
> List = [ [datetime.datetime(2008, 7, 12, 5, 12)], ['46.8'] ]
>
> plot_date(List[0], List[1])
> #####################################
> Returns error:
>
> c = numeric.array(data, dtype=tc, copy=True, order=order)
> ValueError: setting an array element with a sequence.
> #####################################
>
> I have looked at the pylab example for plot_date, however it uses a drange()
> to figure out the dates and doesn't show me how to do it one by one.
>
Hi
Have a look at pylab.date2num()
Mathieu.
> Thank you for your time.
> --
> View this message in context: http://www.nabble.com/plot_date%28%29---Correct-format-to-plot-tp19181899p19181899.html
> Sent from the matplotlib - users mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
From: stuartornum <st...@mu...> - 2008年09月04日 09:06:37
Thanks,
Worked perfectly.
Mathieu Leplatre-2 wrote:
> 
> On Wed, Aug 27, 2008 at 11:14 AM, stuartornum <st...@mu...>
> wrote:
>>
>> Hi,
>>
>> I would like to be able to plot dates along the X axis' with values up
>> the
>> Y. However Im having problems with the correct format in order to pass to
>> plot_date().
>>
>> This is what I have so far: (example)
>>
>> ####################################
>> List = [ [datetime.datetime(2008, 7, 12, 5, 12)], ['46.8'] ]
>>
>> plot_date(List[0], List[1])
>> #####################################
>> Returns error:
>>
>> c = numeric.array(data, dtype=tc, copy=True, order=order)
>> ValueError: setting an array element with a sequence.
>> #####################################
>>
>> I have looked at the pylab example for plot_date, however it uses a
>> drange()
>> to figure out the dates and doesn't show me how to do it one by one.
>>
> 
> Hi
> 
> Have a look at pylab.date2num()
> 
> Mathieu.
> 
> 
> 
>> Thank you for your time.
>> --
>> View this message in context:
>> http://www.nabble.com/plot_date%28%29---Correct-format-to-plot-tp19181899p19181899.html
>> Sent from the matplotlib - users mailing list archive at Nabble.com.
>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>> challenge
>> Build the coolest Linux based applications with Moblin SDK & win great
>> prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the
>> world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
> world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
-- 
View this message in context: http://www.nabble.com/plot_date%28%29---Correct-format-to-plot-tp19181899p19306302.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /