#372 newhistogram title color

Nathan Wolf

I am trying to make a multi-histogram plot (using newhistogram) with a modified text color on the individual histogram sub-titles (the second row of x-axis label text).

I can not for the life of me get that text to change colors. I've tried colorizing everything I can think of, but to no avail. Am I missing something, or is this a missing feature, or possibly a bug?

If there is no way to do this, I'd suggest having it match the main x-axis label color, or perhaps provide a way to set the title color in the "newhistogram" command.

I have a relatively simple example below modified from the newhistogram example using immigration.dat:

set terminal x11
set style fill   solid 1.00 noborder
set style histogram clustered gap 1 title  offset character 2, 0.25, 0
set datafile missing '-'
set style data histograms
set xtics border in scale 0,0 nomirror rotate by -45  offset character 0, 0, 0 autojustify
set title "Histogram sub-title color" 
set xlabel "(note: histogram titles have specified offset relative to X-axis label)" 
set xlabel  offset character 0, -2, 0 font "" textcolor lt -1 norotate
set ylabel "Immigration by decade" 

# Try to color all text red - can not get the sub-titles.
set key textcolor rgb "red"
set border lc rgb "red"
set title textcolor rgb "red"
set xlabel textcolor rgb "red"
set ylabel textcolor rgb "red"

plot newhistogram "Northern Europe", 'immigration.dat' using 6:xtic(1) t col,\
 '' u 13 t col, '' u 14 t col,\
 newhistogram "Southern Europe",\ 
 '' u 9:xtic(1) t col, '' u 17 t col, '' u 22 t col,\
 newhistogram "British Isles",\
 '' u 10:xtic(1) t col, '' u 21 t col

I tried to trace through the code a bit, and it seems like the label color ought to come from the title color of the series, and maybe what I'm missing is the proper syntax to set that up, but I have not been able to. I apologize if this is a simple goof on my part, but I'd appreciate any help nonetheless.


  • Nathan Wolf
    Nathan Wolf

    I omitted this from the example code, but I have tried various forms of the textcolor command in "set style histogram title" as well, but have had no luck, e.g.:

    set style histogram clustered gap 1 title tc rgb "red"

  • Ethan Merritt
    Ethan Merritt

    Ticket moved from /p/gnuplot/support-requests/160/

  • Ethan Merritt
    Ethan Merritt

    Now in CVS

  • Ethan Merritt
    Ethan Merritt

    • status: open --> closed-accepted
    • Group: -->