bokeh / outreach-programs

A space to coordinate outreach programs like Outreachy and Google Season of Docs.
9 stars 12 forks source link

[Micro task] Update a Bokeh example plot #7

Open pavithraes opened 1 year ago

pavithraes commented 1 year ago

Select a Bokeh plot from the examples gallery, review it for accessibility (primarily, check the colors used in the plot), and update it to use more accessible colours if needed.

Share the plot you are working on a comment on this issue, so that we don't have multiple participants working on the same example.

You can make a PR against https://github.com/bokeh/bokeh/issues/11481 for this micro task to update plots. If you find plots that don't need updating, share it on this issue as a comment.

BhaswatiRoy commented 1 year ago

Hello @pavithraes I have changed the colors of Band Plot to more accessible colors with a good color contrast ratio https://github.com/bokeh/bokeh/pull/12922

chinmaychahar commented 1 year ago

Hi @pavithraes Updated examples/styling/mathtext/latex_schrodinger.py to a more accessible color palette referencing the docs.

#bokeh/bokeh/pull/12923

Soot3 commented 1 year ago

Changed colorbar_log example from viridis to iridescent

#bokeh/bokeh/pull/12929

robinokwanma commented 1 year ago

Updated Color pallete for examples\plotting\histogram.py to be more visible and less conflicting

https://github.com/bokeh/bokeh/pull/12937

AnishereMariam commented 1 year ago

Updated colour palette data/linear_cmap.py.

KesharwaniArpita commented 1 year ago

hey , @pavithraes , @bryevdv i have changed the color of the jitter graph taken from the gallery. Can you review my work at https://github.com/KesharwaniArpita/outreach-programs/tree/Gallery_bokeh ?

bryevdv commented 1 year ago

Hi @KesharwaniArpita Thanks for the links. I am not sure that the new colors are an improvement according to the criteria of accessibility. One of the most common color deficiences is an inability to distinguish red from green, but these examples seem to be updated us use both those hues together. I think the jitter example may also have issues with low background/foreground contrast.

Here are some links that may be helpful:

Faith-Nchifor commented 1 year ago
  1. Link: https://docs.bokeh.org/en/latest/docs/examples/basic/bars/basic.html
  2. https://docs.bokeh.org/en/latest/docs/examples/basic/areas/stacked_area.html Hello @pavithraes. I don't think these plots need updating. I think the bar plot is assessible enough even though it uses a default color. The palette (tol) used by the stacked area plot is assessible.
Faith-Nchifor commented 1 year ago

Hello mentors @bryevdv , @pavithraes. I have a question. I noticed that some colors in the example plots were generated using loops. For instance colors = np.array([(r, g, 150) for r, g in zip(50+2*x, 30+2*y)], dtype="uint8"). Does this exercise also involve replacing these colors with the color palettes even if the colors are already looking good?

bryevdv commented 1 year ago

Hi @Faith-Nchifor those are some very old examples that have also been used widely in various public project materials over the years. I think perhaps they could be improved, but I think it's not so clear cut and needs a more involved discussion. I'd advise looking at some of the other examples before those.

Faith-Nchifor commented 1 year ago

okay @bryevdv.

Faith-Nchifor commented 1 year ago

I worked on the slope plot https://github.com/bokeh/bokeh/pull/12959

Soot3 commented 1 year ago

Saw some of those when I was trying out the examples. They all still work on the current version, while palettes like tol will output errors on older versions like bokeh-2.4.3 (which is the default in a Google Colab notebook)

Hi @Faith-Nchifor those are some very old examples that have also been used widely in various public project materials over the years. I think perhaps they could be improved, but I think it's not so clear cut and needs a more involved discussion. I'd advise looking at some of the other examples before those.

fractaldatalearning commented 1 year ago

Hello! I created a PR to make a small change to the span example in the gallery, changing from solid to dashed lines. TBH this is my first time making a PR to something other than a project between me and friends, so I’m very open to any feedback about the process as well as code.

fractaldatalearning commented 1 year ago

Hi, In addition to these two, I went through the gallery and personally believe that the following examples may not require updating as they already have simple but clear descriptions, color combinations consistent with accessible palettes, and words that are legible and descriptive:

https://docs.bokeh.org/en/latest/docs/examples/basic/scatters/markers.html https://docs.bokeh.org/en/latest/docs/examples/basic/scatters/color_scatter.html https://docs.bokeh.org/en/latest/docs/examples/basic/scatters/elements.html https://docs.bokeh.org/en/latest/docs/examples/basic/data/transform_jitter.html https://docs.bokeh.org/en/latest/docs/examples/basic/axes/twin_axes.html https://docs.bokeh.org/en/latest/docs/examples/basic/bars/intervals.html https://docs.bokeh.org/en/latest/docs/examples/basic/bars/nested.html https://docs.bokeh.org/en/latest/docs/examples/basic/bars/colors.html https://docs.bokeh.org/en/latest/docs/examples/basic/layouts/anscombe.html https://docs.bokeh.org/en/latest/docs/examples/basic/annotations/whisker.html https://docs.bokeh.org/en/latest/docs/examples/basic/annotations/box_annotation.html

bryevdv commented 1 year ago

Thanks @fractaldatalearning jus FYI very many of the example plots have been updated in the repo but to not yet appear in the published gallery, because there has not yet been a new release since those changes. At this point, in order to see the true current state of the gallery, you would need to build the docs locally as described in the contributor guide.

fractaldatalearning commented 1 year ago

Thanks @fractaldatalearning jus FYI very many of the example plots have been updated in the repo but to not yet appear in the published gallery, because there has not yet been a new release since those changes. At this point, in order to see the true current state of the gallery, you would need to build the docs locally as described in the contributor guide.

Thanks for the clarification! It makes sense that there would actually be many more plots that are updated by now. To find any additional visualizations to work on, I’ll look through the repo.