Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase default width of colour bar on all plots for clarity/readability #78

Open
sadielbartholomew opened this issue Oct 7, 2024 · 3 comments

Comments

@sadielbartholomew
Copy link
Member

sadielbartholomew commented Oct 7, 2024

The default colour bar width strikes me as too thin, in that it can be fairly to very difficult to see the colours inside it depending on how large you are viewing the plot ('very' when it is smaller) and therefore not particularly readable or clear. Morevoer, other visualisation tools I have seen in use in the field have thicker colour bars, in some cases much thicker such as Iris (see https://scitools-iris.readthedocs.io/en/stable/generated/gallery/index.html for the gallery), which suggests it is normal and preferred that way.

I asked a sample of colleagues whether they agreed the default width is too thin and they overwhelmingly (i.e. all surveyed) did. I included plots varying the width to try to gauge what the new default should be, and it seems like colorbar_thick should be increased to 0.035 from the current default of 0.015.

New default width judegement

I did a quick survey via NCAS Slack with a representative (two-line snippet from the docs example 1) with colorbar_thick varying from the default 0.015 then 0.02 to 0.04 in 0.01 increments (see below), and about half thought the 0.03 plot had the most suitable width, and about half the 0.04 width (including people who thought either of those two were best), hence I think inbetween is the best choice, 0.035.

Though I show a contour plot to illustrate, the width default increase will need to be implemented across all plots for universal benefit of the increase and for consistency.

Code and outputs to compare

I varied the colorbar_thick keyword from the default as follows:

>>> f=cf.read('cfplot_data/tas_A1.nc')[0]
>>> cfp.gopen(file="default-colorbar.png")
>>> cfp.con(f.subspace(time=15))
>>> cfp.gclose()
>>> cfp.gopen(file="new0.2-colorbar.png")
>>> cfp.con(f.subspace(time=15), colorbar_thick=0.02)
>>> cfp.gclose()
>>> cfp.gopen(file="new0.3-colorbar.png")
>>> cfp.con(f.subspace(time=15), colorbar_thick=0.03)
>>> cfp.gclose()
>>> cfp.gopen(file="new0.4-colorbar.png")
>>> cfp.con(f.subspace(time=15), colorbar_thick=0.04)
>>> cfp.gclose()

where the outputs are:

  1. 0.015, current default
    default-colorbar

  2. 0.02
    new0 2-colorbar

  3. 0.03
    new0 3-colorbar

  4. 0.04
    new0 4-colorbar

@davidhassell
Copy link
Contributor

Oh - I prefer the 0.2 default. But I am but one voice in many and will be very happy with whatever you decide.

@sadielbartholomew
Copy link
Member Author

sadielbartholomew commented Oct 10, 2024

Oh, well thanks for registering your thoughts - maybe I need to do a more comprehensive survey, since I am going by the opinions of ~10 people? (BTW 0.015 is the default so it sounds like you still prefer the width to increase, just not by so much?)

@davidhassell
Copy link
Contributor

(BTW 0.015 is the default so it sounds like you still prefer the width to increase, just not by so much?)

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants