|
From: Ethan M. <eam...@gm...> - 2015-03-16 20:34:59
|
oops - sorry not "as a palette color" - that should be "as a linetype
color". But the point remains the same.
On Mon, Mar 16, 2015 at 1:34 PM, Ethan Merritt <eam...@gm...> wrote:
>> anyone have any idea what's going wrong here?
>
> You have told gnuplot to plot with "lc variable", which means
> "interpret the final using spec as a palette color". That's fine for
> the plot itself.
>
> But how are you expecting the program to know what color you want in
> the key sample?
> You have made three plots, each containing multiple colors. The key
> sample for each plot can only be one color, so where would this come
> from? I don't actually know myself, but in any case I don't see how
> it can be expected to come out as some particular color among the
> several that appear in the corresponding plot.
>
> I haven't had time to seriously look at this. There may or may not be
> a simple way to do what you want, but at the moment I (like the
> program itself) don't exactly know what that is.
>
> On Mon, Mar 16, 2015 at 12:58 PM, David Lang <da...@la...> wrote:
>> 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
>>>
>>
>> ------------------------------------------------------------------------------
>> 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
|