In a data visualization, I need to show two lines: one representing an actual, observed value (in the example below: red), and one representing a norm, or what this value should be in an ideal case (in the example below: green).

While it feels very intuitive to encode "good" values as green, and "bad" values as red (and similar conventions exist for representing magnitude, terrain height, and many others), I'm struggling with coming up with an intuitive visual code for "real" vs "ideal".

Is there any conventional, intuitive way to do that? Or is it completely arbitrary?

Answers may include not only colors, but also styling the lines in any other way (make them wider, dashed, and so on), or even representing those values in some other way (not as lines), as long as it's applicable to a graph like the one below.

data visualization

Disclaimer: Obviously, I will also add a legend. My question is only about the visual style.

  • It doesn't work in your particular example, but in another situation one could use a symmetric gauge with the norm/ideal value in the top middle.
    – Glorfindel
    Jul 24, 2019 at 12:06
  • Do you want to focus attention more on the actual readings, the expected values, or neither/both?
    – jeffB
    Jul 24, 2019 at 17:55

2 Answers 2


On the webpage "Statistical Analysis of Thermal Conditions of Lanes" they choose to use box whiskers to show the historical extreme range while the actual temperature was shown with a red line, the expected temperature (based on recent history) is depicted as a white line which makes it somewhat more difficult to see.

If you are trying to emphasize the actual temperature and are less concerned about predictions which are not always correct this is one way to de-emphasize the predicted values.

Whisker Chart

Hackster.io's webpage "ThingSpeak Weather Station & Data Analysis" offers code written in Matlab where historical temperature is presented in one chart while the min. max. and mean are represented by dotted lines, without a strict prediction, in a second chart. The actual temperature is indicated by a solid line.

Line Chart

It's not so much "arbitrary" as it is how you want to convey the information and what it is that you want to clearly emphasize in your presentation. Wide bars are generally for a range, dotted lines and lighter colors for reduced emphasis while solid lines and darker colors stand out more. Where temperature is concerned red is a good choice for hot and bluer tones for cold. The first chart used yellow for warmer temperatures since the current temperature was presented using red.


Projection lines are often dashed or dotted to imply their state, while "actual" data lines are often solid and feature bright colors:

Definitely add a key, as well, though! enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.