examples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
examples [2019/01/09 00:46] – [Colour Scales - Lookups] update release date brucemuttonexamples [2019/12/07 08:30] – How does the default work tarquinwj
Line 383: Line 383:
 [[http://cachtice.speleo.sk/mapa_cj/template.html|{{therion:cj_icon.gif}}]] //Click on picture to see original size// [[http://cachtice.speleo.sk/mapa_cj/template.html|{{therion:cj_icon.gif}}]] //Click on picture to see original size//
 ---- ----
-=====Colour Scales - Lookups===== +=====Colour Palette Scales - Lookups===== 
-Therion 5.4.2 (8 Jan 2019) introduced a new concept, lookups, to control colour palettes for map and atlas outputs.+Therion 5.4.2 (8 Jan 2019) introduced a new concept, lookups, to create and control collections of map-foreground colour palettes for map and atlas outputs.  Lookups can define the text and appearance of 'colour legends'.
  
 [[https://www.mail-archive.com/therion@speleo.sk/msg06798.html|Original forum post advising of this change to the development release Nov 2017]] [[https://www.mail-archive.com/therion@speleo.sk/msg06798.html|Original forum post advising of this change to the development release Nov 2017]]
Line 427: Line 427:
        
    # do not specify any colours if you want Therion to use it's default colour palette, just use     # do not specify any colours if you want Therion to use it's default colour palette, just use 
-   # empty brackets, [], if you want to specify text for a particular parameter.+   # empty brackets, [], in place of a colour specification, if you want to specify text for a particular parameter.
        
   endlookup   endlookup
  
 **lookup altitude examples** **lookup altitude examples**
 +
 +The default automatic altitude colour bands take their highest and lowest values from the highest and lowest survey stations for the parts of the survey that are used in the rendering. It takes all the survey stations within the "cave" (ie. not in a "flags surface" section), from whichever surveys and subsurveys are going to be used in the rendering (if you are using a map, it will be whichever surveys and subsurveys have some of their parts included in that map), and finds the highest and lowest station. This happens even if the highest and lowest stations within those surveys are not even rendered because they are not included in a scrap.
 +
 +The legend will then be divided up into 7 numbers; the highest station, the lowest station, and 5 equally spaced values in between. These values are then rounded to the nearest integer when rendering (this rounding will also happen when displaying legend lookup values). This makes it quite possible that no scrap will ever be the colour of the highest and lowest stations, since scraps normally have more than one station in them, and the scrap altitude and colour will be taken from the average of those. The colour, as with lookup colours, will be faded the appropriate distance between the nearest colour values on either side.
 +
 +This also means that for a cave with very little vertical range, the default legend may show "10, 10, 11, 11, 11, 12, 12", when in actual fact, the numbers are all part way between 10 and 12.
 +
 +Using a lookup table allows you to take much more control, giving neater colour intervals (like one colour every 10 metres), or allowing the highest and lowest scraps to actually be the top and bottom colours.
  
   lookup altitude -title "Altitude legend"   lookup altitude -title "Altitude legend"
Line 442: Line 450:
   endlookup   endlookup
  
-It should generate red -> blue scale with desired values. +It should generate red -> blue scale with desired values. Note that this is a linear fade with red at one end, blue at the other, and purple in the middle; it does **not** rotate the hue via orange, yellow or green in the middle.
  
 You may specify multiple lookup tables for same criterion using an index, ie  ":" separator in label You may specify multiple lookup tables for same criterion using an index, ie  ":" separator in label
Line 471: Line 479:
   endlookup   endlookup
 This will produce a single colour for passage between 1500 and 1600 m and between 1800 and 1900 m, and leave all other passage, above, in between, and below, uncoloured. This will produce a single colour for passage between 1500 and 1600 m and between 1800 and 1900 m, and leave all other passage, above, in between, and below, uncoloured.
 +
 +The default altitude rainbow is not made with a continuous range of colour hues. Instead, it is made with 7 discrete colours, with altitudes between them fading between the discrete colours. This means that you can use a lookup table to exactly replicate this colour behaviour, using the following colour values which match the default ones used by Therion (shown here within the range of altitudes from 4 to 96 metres):
 +
 +  lookup altitude:manualrainbow
 +    96 [100 25 25]
 +    81 [100 87.25 25]
 +    65 [49.75 100 25]
 +    50 [25 100 61.75]
 +    35 [25 74.5 100]
 +    20 [37 25 100]
 +    4 [99.25 25 100]
 +  endlookup
  
 **lookup date examples** **lookup date examples**
  • examples.txt
  • Last modified: 5 months ago
  • by brucemutton