|
From: David L. <da...@la...> - 2015-03-16 19:58:22
|
ping,
anyone have any idea what's going wrong here?
David Lang
On Mon, 9 Mar 2015, David Lang wrote:
> Date: Mon, 9 Mar 2015 15:11:22 -0700 (PDT)
> From: David Lang <da...@la...>
> To: gnu...@li...
> Subject: Re: [Gnuplot-info] problem with legend in svg pie-chart
>
> Doing some more digging, I'm finding that the colors used for the key legend are
> not the colors used for the linetype definitions that are used to make the graph
>
> I changed the lines to
> set linetype 1 lc "purple" lw 5 pt 3 ps 3
> set linetype 2 lc "green" lw 5 pt 3 ps 3
> set linetype 3 lc "yellow" lw 5 pt 3 ps 3
> set linetype 4 lc "blue" lw 5 pt 3 ps 3
> set linetype 5 lc "orange" lw 5 pt 3 ps 3
> set linetype 6 lc "red" lw 5 pt 3 ps 3
> set linetype 7 lc "brown" lw 5 pt 3 ps 3
> set linetype 8 lc "gold" lw 5 pt 3 ps 3
> set linetype 9 lc "cyan" lw 5 pt 3 ps 3
> set multiplot
>
> plot for [i=4:6] "site_summary.data" u (x+column(0)*250):(y):(r):(360*(sum
> [col=4:(i-1)] column(col))/(sum [col=4:6] column(col))):(360*(sum [col=4:i]
> column(col))/(sum [col=4:6] column(col))):(i) title columnhead(i) with circles
> lc var
>
> and while the pie segments are blue, orange, and red. the legend colors are
> brown, gold, gold
>
> so why is the key showing different color codes than what was used to make the
> graphs
>
> and why is color 8 used twice?
>
> David Lang
>
>
>
>
> On Mon, 9 Mar 2015, David Lang wrote:
>
>> I'm using the following script to generate pie charts for each line in a file.
>> The problem is that the legend at the bottom ends up just having three solid
>> black circles instead of colored circles.
>>
>> I'm using gnuplot v5.0 (compiled from source)
>>
>> What can I do to fix this?
>>
>>
>> linecount = "`cut -f 1 -d '|' site_summary.data |uniq| sed s/$/' '/ |wc -l`"
>> sitecount = value("linecount")-1
>> set term svg size (sitecount * 250),300 dynamic noenhanced
>> unset tics
>> unset border
>> unset colorbox
>> set key autotitle columnheader
>> set key center bottom horizontal samplen 5
>> set xrange [-(125*sitecount):(125*sitecount)]
>> set yrange [-150:150]
>> set angles degree
>> x=0
>> y=0
>> r=100.0
>> set datafile separator "|"
>> set style fill transparent solid 1.0 noborder
>> set linetype 1 lc "green" lw 5 pt 3 ps 3
>> set linetype 2 lc "blue" lw 5 pt 3 ps 3
>> set linetype 3 lc "orange" lw 5 pt 3 ps 3
>> set linetype 4 lc "red" lw 5 pt 3 ps 3
>> set multiplot
>>
>> plot for [i=4:6] "site_summary.data" u (x+(column(0)-1)*250):(y):(r):(360*(sum [col=4:(i-1)] column(col))/(sum [col=4:6] column(col))):(360*(sum [col=4:i] column(col))/(sum [col=4:6] column(col))):(i-2) title columnhead(i) with circles lc var
>> plot for [i=4:6] "" u (x+(column(0)-1)*250+(r*1.1)*cos(360*((sum [col=4:(i-1)] column(col))+ column(i)/2.0)/(sum [col=4:6] column(col)))):(y+(r*1.1)*sin(360*((sum [col=4:(i-1)] column(col))+ column(i)/2.0)/(sum [col=4:6] column(col)))):i with labels notitle
>> plot "" skip 1 u (x+(column(0)-1)*250):(y+(r*1.5)):1 with labels notitle
>> plot "" skip 1 u (x+(column(0)-1)*250):(y+(r*1.3)):(gprintf("~%.0f systems",$3)) with labels notitle
>>
>>
>> example data
>>
>> Site|Date|Systems|Moderate|Severe|Critical
>> Corp|2015-03-01|700|9000|2000|500
>> DC1|2015-03-01|500|6000|400|60
>> DC1|2015-03-01|300|5000|300|50
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> gnuplot-info mailing list
>> gnu...@li...
>> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> gnuplot-info mailing list
> gnu...@li...
> Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
|