Skip to content

Commit b7bec44

Browse files
committed
DOC: Minor style improvement of radio buttons examples
Lighten the edges of the Axes serving as a container for the buttons. The black line has too much contrast and made the panels look "old".
1 parent cc6cead commit b7bec44

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

galleries/examples/widgets/radio_buttons.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ def f(t, freq):
4040
axd['main'].set(xlabel="Time (s)", ylabel="Amplitude", title="Sine Wave")
4141

4242
background_color = '0.95'
43+
edge_color = '0.8'
4344

4445
axd['freq'].set_facecolor(background_color)
46+
axd['freq'].spines[:].set_color(edge_color)
4547
axd['freq'].set_title('Frequency')
4648
radio = RadioButtons(axd['freq'], labels=list(FREQUENCIES.keys()),
4749
label_props={'fontsize': [12, 14, 16]},
@@ -56,6 +58,7 @@ def update_frequency(label):
5658

5759

5860
axd['color'].set_facecolor(background_color)
61+
axd['color'].spines[:].set_color(edge_color)
5962
axd['color'].set_title('Color')
6063
radio2 = RadioButtons(
6164
axd['color'], ('red', 'blue', 'green'),
@@ -73,6 +76,7 @@ def update_color(label):
7376

7477

7578
axd['linestyle'].set_facecolor(background_color)
79+
axd['linestyle'].spines[:].set_color(edge_color)
7680
axd['linestyle'].set_title('Linestyle')
7781
radio3 = RadioButtons(axd['linestyle'], ('solid', 'dashed', 'dashdot', 'dotted'))
7882

galleries/examples/widgets/radio_buttons_grid.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737
# Configure the radio buttons axes
3838
ax_buttons.set_facecolor("0.95")
39+
ax_buttons.spines[:].set_color("0.8")
3940
ax_buttons.set_title("Line Color")
4041
# Create a 2D grid of color options (3 rows x 2 columns)
4142
colors = ["red", "yellow", "green", "purple", "brown", "gray"]

0 commit comments

Comments
 (0)