Page 1 of 1

Shapes and colours for Graphs

Posted: Fri 15 May 2020 9:05 am
by sutne
Is it possible to control the shapes and colours of the Graphs in Cumulusutils?
As seen in the enclosed screen-dump the graph for 2018 and 2013 has the same symbols and colour.
(We all know today that 2018 was the hot year, but maybe some day we have forgotten that.)

Re: Shapes and colours for Graphs

Posted: Fri 15 May 2020 12:23 pm
by HansR
Yes, the colours can be changed.

The graphs module has the following parameters:

Code: Select all

GraphColors=['darkcyan', 'crimson', 'cyan', 'blue', 'green', 'yellow', 'red', 'blueviolet', 'chartreuse', 'coral', 'cornflowerblue', 'darkblue', 'darkgreen']
MaxNrOfSeriesVisibileInGraph=2
and defines 13 colours which you can change for whatever valid colour you like in any HTML/Highcharts colour definition. Th number of colours also can be increased.

The idea behind it was that:
  1. People have different perceptions of coulours and intensities so it would be unwise to only have a small set prescribed colours
  2. Highcharts cycles the colours so if you have more than 13 years of data visible the first colour is used again. Either make less series visible or add another colour
  3. It was assumed - and I guess it does - that many series confuse the user. Therefore only the last two years are defaulted to be visible at startup. If you have more series, you can click visible whatever series you want to view and compare with. This graph was inspired by the Charctic Interactive Sea Ice Graph.
  4. In that same type of graph (both for temp and rain) it is possible to show reference lines for the Normal Values and for the Station Average. The last one becoming more and more interesting as the number of series/years increases. This is governed by

    Code: Select all

    UseNormalTempReference=both
    UseNormalRainReference=both
    
    with the possible values: Normal, StationAverage, Both, None (not case sensitivive).
Hope this explains it a bit, enough user settings I think.

Re: Shapes and colours for Graphs

Posted: Sun 17 May 2020 5:11 am
by sutne
Thank you.
This was helpful, but I will comment on the colours used by default: ‘crimson’ looks very much the same as ‘red’ when used on the graphs. I changed it to ‘maroon’.
It was assumed - and I guess it does - that many series confuse the user.
Yes and no. It is useful to see the trend over the whole period. And if one wants to compare only few years, one can select them from the year numbers.

Re: Shapes and colours for Graphs

Posted: Sun 17 May 2020 5:39 am
by HansR
sutne wrote: Sun 17 May 2020 5:11 am Thank you.
This was helpful, but I will comment on the colours used by default: ‘crimson’ looks very much the same as ‘red’ when used on the graphs. I changed it to ‘maroon’.
It was assumed - and I guess it does - that many series confuse the user.
OK.
sutne wrote: Sun 17 May 2020 5:11 am Yes and no. It is useful to see the trend over the whole period. And if one wants to compare only few years, one can select them from the year numbers.
I was afraid there would be pluralism in this, so I gave it a configuration option :lol: