Skip to content

Commit 2896d7a

Browse files
authored
Feat true black dark bg (#722)
* Fix tick visibility leaking from styles in alternative axes When applying custom styles like dark_background, matplotlib's styling dictionaries often include explicit boolean flags for tick visibility on all sides (e.g. left, right, top, bottom). Previously, UltraPlot queried these style settings using _get_tickline_props and inadvertently reapplied them to the axes, completely overriding UltraPlot's internal locators. This caused bugs such as the left axis displaying right ticks and the right axis displaying left ticks when a style was active. By aggressively popping visibility keys out of the retrieved styling dictionary, we ensure that themes strictly govern visual appearances (color, width, padding) without hijacking the structural tick visibility correctly managed by the format methods. * Update dark_background theme to use true black instead of dark gray The previous dark_background style used a dark slate/gray color (#111827 and #0f172a) for the figure, axes, and legend backgrounds. This updates those background colors to true black (#000000) to provide a deeper contrast and match the standard expectation of a true dark background theme.
1 parent fbf413c commit 2896d7a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

ultraplot/config.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,20 @@
7979
"savefig.edgecolor": "none",
8080
},
8181
"dark_background": {
82-
"figure.facecolor": "#111827",
83-
"figure.edgecolor": "#111827",
84-
"axes.facecolor": "#111827",
82+
"figure.facecolor": "#000000",
83+
"figure.edgecolor": "#000000",
84+
"axes.facecolor": "#000000",
8585
"axes.edgecolor": "#cbd5e1",
8686
"axes.labelcolor": "#f8fafc",
8787
"text.color": "#f8fafc",
8888
"xtick.color": "#cbd5e1",
8989
"ytick.color": "#cbd5e1",
9090
"grid.color": "#475569",
9191
"grid.alpha": 0.35,
92-
"legend.facecolor": "#0f172a",
92+
"legend.facecolor": "#000000",
9393
"legend.edgecolor": "#475569",
94-
"savefig.facecolor": "#111827",
95-
"savefig.edgecolor": "#111827",
94+
"savefig.facecolor": "#000000",
95+
"savefig.edgecolor": "#000000",
9696
"axes.prop_cycle": cycler.cycler(
9797
color=(
9898
"#60a5fa",

0 commit comments

Comments
 (0)