Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#78 3 bình luận 0 reaction 1 người được giao Xem trên GitHub

@sadielbartholomew đang làm issue này rồi.

Từ ngày 7/10/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement image-based plotting

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

Ngôn ngữ chính
Python
Star
21
Fork
11
Merge trung bình
3 giờ 36 phút
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NCAS-CMS/cf-plot

Tất cả issue của NCAS-CMS/cf-plot

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.