Hi Nick,

Anything that works!

Hoping that it could be done through pandas.

I perhaps should have noted the form I originally brought the data into - a
pivot table with zeroes replacing NaNs:

xtab=df.pivot_table(index=(['Message','Station']),columns='Day',values='Count',fill_value=0)

This sets up a nice-looking dataframe but I can't seem to get anything
right from there on.

Regards,

Kevin.

On 27 May 2016 at 08:20, Nicholas Mellor <[email protected]>
wrote:

> Hi Kevin,
>
>
>
> What’s the plotting software you’re using?
>
>
>
> Nick
>
>
>
> *From:* melbourne-pug [mailto:melbourne-pug-bounces+nicholas.mellor=
> [email protected]] *On Behalf Of *Kevin Shackleton
> *Sent:* Thursday, 26 May 2016 10:56 PM
> *To:* Melbourne Python Users Group <[email protected]>
> *Subject:* [melbourne-pug] Multi-line subplots
>
>
>
> Hi All,
>
> I am making heavy going of what should be quite concise code.
>
> I monitor messages (about 30 sorts) coming from several (3 or 4)
> stations.  I make a count of the messages per station per day, going back
> 30 days (0, -1, -2 . .), like this:
>
> Message  Station  Day  Count
>
> A               A          0      5
>
> A               A          -1     2
> A               B          0     13
> A               B          -1     3
> A               C          0      2
>
> A               C          -1     2
> B               A          0      1
> B               A          -1    21
> B               B          0     18
> B               B          -1    34
> B               C          0       7
>
> B               C          -1    38
> C               A  etc . .
>
> To make it quick and easy for the operating staff to review the site
> status, I want to make about 30 plots (in a single column on the canvas),
> each with the X axis going from -30 to 0 days, Y axis of Count and 3 or 4
> lines showing the message count for each station.
>
> I'm having trouble finding how to subplot the graph page and print
> multiple lines in each sub-plot.
>
> There is also the need to fill in missing values to not misrepresent
> having zero messages for a message/station/day, consequently I was trying
> to run the data via a pivot_table(fill_value=0).
>
> A clue or reference would be greatly appreciated,
>
> Regards,
>
> Kevin.
>
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
> ______________________________________________________________________
> This email has been scanned by the Symantec Email Security.cloud service.
> For more information please visit http://www.symanteccloud.com
> ______________________________________________________________________
>
> _______________________________________________
> melbourne-pug mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/melbourne-pug
>
>
_______________________________________________
melbourne-pug mailing list
[email protected]
https://mail.python.org/mailman/listinfo/melbourne-pug

Reply via email to