# histogram withx axis dates

Sorry if I've missed this in the docs but is it possible to directly plot a histogram with a date x axis or do I have to roll my own? This is critical as I'm on a diet and trying to plot my weight loss against date

--
Cheers.

Mark Lawrence.

Sorry if I've missed this in the docs but is it possible to directly
plot a histogram with a date x axis or do I have to roll my own? This

I'm assuming you have weight data AND date data. That is, a list of
dates and associated with each date a value of your weight for that
date.

If you have the dates, you could check out:

http://stackoverflow.com/questions/5498510/creating-graph-with-date-and-time-in-axis-labels-with-matplotlib

and

http://matplotlib.sourceforge.net/users/recipes.html#fixing-common-date-annoyances

is critical as I'm on a diet and trying to plot my weight loss against
date

Good luck

On Sat, Jul 14, 2012 at 12:49:29PM +0100, Mark Lawrence wrote:

--
Cheers.

Mark Lawrence.

--
Damon McDougall
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom

Sorry if I've missed this in the docs but is it possible to directly
plot a histogram with a date x axis or do I have to roll my own? This

I'm assuming you have weight data AND date data. That is, a list of
dates and associated with each date a value of your weight for that
date.

Correct.

If you have the dates, you could check out:

http://stackoverflow.com/questions/5498510/creating-graph-with-date-and-time-in-axis-labels-with-matplotlib

and

http://matplotlib.sourceforge.net/users/recipes.html#fixing-common-date-annoyances

Will do.

is critical as I'm on a diet and trying to plot my weight loss against
date

Good luck

Thanks.

--
Cheers.

Mark Lawrence.

Finally thanks for the quick response.

On 14/07/2012 13:05, Damon McDougall wrote:

On Sat, Jul 14, 2012 at 12:49:29PM +0100, Mark Lawrence wrote:

--
Cheers.

Mark Lawrence.

Are you sure you want a histogram - weight vs date sounds more like a simple bar graph (which matplotlib does trivially).

-Bill

On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote:

Sorry if I've missed this in the docs but is it possible to directly
plot a histogram with a date x axis or do I have to roll my own? This
is critical as I'm on a diet and trying to plot my weight loss against
date

--
Cheers.

Mark Lawrence.

You are correct, why did I say histogram when I've been looking at my own code that plots bars? Just shows that a beer free diet is no good for you Let's try again, is it possible to directly
plot a bar chart with a date x axis or do I have to roll my own?

On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote:

On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote:

Sorry if I've missed this in the docs but is it possible to directly
plot a histogram with a date x axis or do I have to roll my own? This
is critical as I'm on a diet and trying to plot my weight loss against
date

--
Cheers.

Mark Lawrence.

Are you sure you want a histogram - weight vs date sounds more like a simple bar graph (which matplotlib does trivially).

-Bill

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

--
Cheers.

Mark Lawrence.

Everything I said was not at all specific to histograms

On Sat, Jul 14, 2012 at 01:57:13PM +0100, Mark Lawrence wrote:

On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote:
> On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote:
>
>> Sorry if I've missed this in the docs but is it possible to directly
>> plot a histogram with a date x axis or do I have to roll my own? This
>> is critical as I'm on a diet and trying to plot my weight loss against
>> date
>>
>> --
>> Cheers.
>>
>> Mark Lawrence.
>
> Are you sure you want a histogram - weight vs date sounds more like a simple bar graph (which matplotlib does trivially).
>
> -Bill
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>

You are correct, why did I say histogram when I've been looking at my
own code that plots bars? Just shows that a beer free diet is no good
for you Let's try again, is it possible to directly
plot a bar chart with a date x axis or do I have to roll my own?

--
Cheers.

Mark Lawrence.

--
Damon McDougall
http://damon-is-a-geek.com
B2.39
Mathematics Institute
University of Warwick
Coventry
West Midlands
CV4 7AL
United Kingdom

Sorry if I've missed this in the docs but is it possible to directly
plot a histogram with a date x axis or do I have to roll my own? This
is critical as I'm on a diet and trying to plot my weight loss against
date

--
Cheers.

Mark Lawrence.

Are you sure you want a histogram - weight vs date sounds more like a simple bar graph (which matplotlib does trivially).

-Bill

[byte]

You are correct, why did I say histogram when I've been looking at my
own code that plots bars? Just shows that a beer free diet is no good
for you Let's try again, is it possible to directly
plot a bar chart with a date x axis or do I have to roll my own?

--
Cheers.

Mark Lawrence.

A good start on time-series X-axis plotting is here: http://blog.mafr.de/2012/03/11/time-series-data-with-matplotlib/

And the sorceforge matplotlib gallery has several versions of bar charts (with code) here: http://matplotlib.sourceforge.net/gallery.html

-Bill

On Jul 14, 2012, at 8:57 AM, Mark Lawrence wrote:

On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote:

On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote:

Apologies for my lack of manners in failing to get back to you sooner. I've got everything working just fine owing to your responses, thanks very much, if I ever bump into any of you my round

On 15/07/2012 04:04, William R. Wing (Bill Wing) wrote:

On Jul 14, 2012, at 8:57 AM, Mark Lawrence wrote:

On 14/07/2012 13:41, William R. Wing (Bill Wing) wrote:

On Jul 14, 2012, at 7:49 AM, Mark Lawrence wrote:

Sorry if I've missed this in the docs but is it possible to directly
plot a histogram with a date x axis or do I have to roll my own? This
is critical as I'm on a diet and trying to plot my weight loss against
date

--
Cheers.

Mark Lawrence.

Are you sure you want a histogram - weight vs date sounds more like a simple bar graph (which matplotlib does trivially).

-Bill

[byte]

You are correct, why did I say histogram when I've been looking at my
own code that plots bars? Just shows that a beer free diet is no good
for you Let's try again, is it possible to directly
plot a bar chart with a date x axis or do I have to roll my own?

--
Cheers.

Mark Lawrence.

A good start on time-series X-axis plotting is here: http://blog.mafr.de/2012/03/11/time-series-data-with-matplotlib/

And the sorceforge matplotlib gallery has several versions of bar charts (with code) here: http://matplotlib.sourceforge.net/gallery.html

-Bill

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

--
Cheers.

Mark Lawrence.