[Haskell-cafe] Choosing color of the track

13 views
Skip to first unread message

Manish Trivedi

unread,
Sep 18, 2012, 12:40:19 AM9/18/12
to haskel...@haskell.org
Hi Folks,

I am trying to plot two tracks with different colors.
Following is my input file,

------
2012-09-18 00:10:48,166 @CurrentPerHour13057 Red
2012-09-18 00:10:48,166 =CurrentPerHour13057 0.0
2012-09-18 00:10:58,155 =CurrentPerHour13057 0.0
2012-09-18 00:11:08,203 =CurrentPerHour13057 0.0
2012-09-18 00:11:18,166 =CurrentPerHour13057 0.0
2012-09-18 00:11:28,159 =CurrentPerHour13057 0.0
2012-09-18 00:11:38,170 =CurrentPerHour13057 0.0
2012-09-18 00:11:48,175 =CurrentPerHour13057 0.0
2012-09-18 00:11:58,174 =CurrentPerHour13057 0.0
2012-09-18 00:12:08,216 =CurrentPerHour13057 0.0
2012-09-18 00:12:18,218 =CurrentPerHour13057 0.0
2012-09-18 03:58:28,159 @PacingReqPerHr13057 Blue
2012-09-18 03:58:28,159 =PacingReqPerHr13057 2375.0534412521242
2012-09-18 03:58:38,161 =PacingReqPerHr13057 2375.383005739316
2012-09-18 03:58:48,175 =PacingReqPerHr13057 2375.713057258422
2012-09-18 03:58:58,160 =PacingReqPerHr13057 2376.0422443063935
2012-09-18 03:59:08,192 =PacingReqPerHr13057 2376.3730727321126
2012-09-18 03:59:18,207 =PacingReqPerHr13057 2375.9038854561304
2012-09-18 03:59:28,168 =PacingReqPerHr13057 2376.2324444615497
2012-09-18 03:59:38,156 =PacingReqPerHr13057 2376.5619853019184
2012-09-18 03:59:48,160 =PacingReqPerHr13057 2376.892145685344
2012-09-18 03:59:58,160 =PacingReqPerHr13057 2377.222265743067
-----

tplot -o /root/color.png  -or 1024x768 -k 'CurrentPerHour' 'lines' -k 'PacingReqPerHr' 'lines' -if /root/color.input -tf 'date %Y-%m-%d %H:%M:%OS'

I cant get to print plots in different color. Could anyone point out what am I doing wrong?

Thanks,
Manish

Eugene Kirpichov

unread,
Sep 18, 2012, 1:48:54 AM9/18/12
to Manish Trivedi, haskel...@haskell.org
Hi,

I'm the author and I'll reply tomorrow, sorry, going to sleep now :) thanks for the interest in the tools anyway!

17.09.2012, в 21:40, Manish Trivedi <trivm...@gmail.com> написал(а):

> _______________________________________________
> Haskell-Cafe mailing list
> Haskel...@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskel...@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Eugene Kirpichov

unread,
Sep 18, 2012, 1:48:47 PM9/18/12
to Manish Trivedi, haskel...@haskell.org
Hi Manish,

The meaning of "@" is not what you think it is. It merely draws
colored bars, it does NOT control the color of other kinds of charts.

Here's how what you want can be achieved:
* Remove the "@" lines
* Append a common prefix to the input tracks you want to be displayed
on the same output track, e.g. "t.":
2012-09-18 00:10:48,166 =t.CurrentPerHour13057 0.0
2012-09-18 00:10:58,155 =t.CurrentPerHour13057 0.0
..
2012-09-18 03:58:28,159 =t.PacingReqPerHr13057 2375.0534412521242
2012-09-18 03:58:38,161 =t.PacingReqPerHr13057 2375.383005739316

* Use the "within" diagram kind: tplot .... -dk ''within[.] lines"

Then you'll have a single output track where data from these input
tracks is displayed with different color. However, you don't control
the precise color (I just never really needed to control it, I only
needed it to be different for different tracks).
> _______________________________________________
> Haskell-Cafe mailing list
> Haskel...@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



--
Eugene Kirpichov
http://www.linkedin.com/in/eugenekirpichov
We're hiring! http://tinyurl.com/mirantis-openstack-engineer

Manish Trivedi

unread,
Sep 18, 2012, 2:44:47 PM9/18/12
to Eugene Kirpichov, haskel...@haskell.org
Thanks a ton Eugene. that worked like a charm :) Appreciate you looking into this and suggesting me the correct approach.
I have another question that if I had single track storing response time of each request, how could I get 95th percentile of the response time. I know TimePlot wiki has quantile example but I havent been able to successfully use it.

Regards,
-Manish

Eugene Kirpichov

unread,
Sep 18, 2012, 2:51:23 PM9/18/12
to Manish Trivedi, haskel...@haskell.org
Hi,

Suppose you have data like this:

2012-09-18 00:10:48,166 =responseTime 53
...

Then you should just use -dk 'quantile 0.95' and you'll see a graph of
stacked bars like [XXXX][YYYYY] (but vertical) where XXX is min..95%
and YYY is 95%..max.
Reply all
Reply to author
Forward
0 new messages