Skip to content

Commit

Permalink
Use colorblind-friendly colors in the scatter plots gallery example (G…
Browse files Browse the repository at this point in the history
…enericMappingTools#1013)

Co-authored-by: Michael Grund <[email protected]>
  • Loading branch information
2 people authored and Josh Sixsmith committed Dec 21, 2022
1 parent 0435c95 commit 2a950b9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/gallery/symbols/scatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
projection="X10c/10c",
frame=["xa0.2fg", "ya0.2fg", "WSrt"],
)
for color in ["blue", "orange", "green"]:
for color in ["gray73", "darkorange", "slateblue"]:
x, y = np.random.rand(2, n) # random X and Y data in [0,1]
sizes = np.random.rand(n) * 0.5 # random size [0,0.5], in cm
# plot data points as circles (style="c"), with different sizes
Expand All @@ -32,9 +32,9 @@
sizes=sizes,
color=color,
# Set the legend label,
# and set the circle size to be 0.25 cm (+S0.25c) in legend
# and set the symbol size to be 0.25 cm (+S0.25c) in legend
label=f"{color}+S0.25c",
transparency=70, # set transparency level for all symbols
transparency=50, # set transparency level for all symbols
)

fig.legend(transparency=30) # set transparency level for legends
Expand Down

0 comments on commit 2a950b9

Please sign in to comment.