Path: csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?Q?J=c3=b6rg_Buchholz?= Newsgroups: comp.graphics.apps.gnuplot Subject: Re: How to define bar area colors in a histogram Date: Tue, 10 Apr 2018 08:48:05 +0200 Organization: A noiseless patient Spider Lines: 56 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 10 Apr 2018 06:48:06 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="f487d81bd2db3a71ad8e61f1a1e0bb95"; logging-data="1364"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+xbmI74eMgCEgmXPhzqqmfG6OC1Gqz4vg=" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 In-Reply-To: Content-Language: en-GB Cancel-Lock: sha1:512RWK0zpij4bkonKHQbFSkjRiA= Xref: csiph.com comp.graphics.apps.gnuplot:3939 On 08.04.2018 17:49, Bengt T wrote: > I use the following input to gnuplot: > > #***** > clear > reset > > set key left top verical > > set xtics rotate > set ytics rotate > set ytics 0, 200 > set y2tics rotate > set y2tics 0, 200 > > set grid > > set style data histogram > set style fill solid border > set style histogram rowstacked > set boxwidth 0.5 relative > > set terminal jpeg font "Droid Sans Mono" > set output "tmp.jpg" > > plot for [COL=2:4] 'testdata.txt' using COL:xticlabels(1) title columnheader > #***** > > for the following data (testdata.txt): > > #**** > Date Key_1 Key_2 Key_3 > 2017-01-31 50 50 50 > 2017-02-28 75 50 150 > 2017-03-31 25 100 200 > 2017-04-30 150 200 250 > 2017-05-31 200 50 100 > #**** > > In my PC this results in bars with red, green and blue areas. > > I kindly ask for advises on how to define other colors? > You can predefine the colors by setting the color of the linetype. As example set linetype 1 lc rgb 'green' set linetype 2 lc rgb 'yellow' set linetype 3 lc rgb 'goldenrod' gives the three columns in green, yellow and goldenrod to you. Jörg