@@ -70,6 +70,56 @@ def apply_style():
7070 mpl .rcParams .update (PPM_RC )
7171
7272
73+ # ─── Light-theme palette (for prose-figure mode) ────────────────────────────
74+ # Use this when a figure sits in body prose where a near-black background
75+ # reads as a "visual black hole" against the document's white pages.
76+
77+ BG_LIGHT = '#F2F2F6'
78+ PANEL_LIGHT = '#FAFAFC'
79+ TEXT_DARK = '#1A1A2E'
80+ TEXT_MUTED = '#4A4A5C'
81+ GRID_LIGHT = '#CCCCD4'
82+
83+ # Semantic colors darkened so they stay readable on light bg.
84+ GOLD_DARK = '#A8841F'
85+ VIOLET_DARK = '#5547A8'
86+ CYAN_DARK = '#1A6A75'
87+ ORANGE_DARK = '#D86A0A'
88+ RED_DARK = '#B83020'
89+ GREEN_DARK = '#1E8048'
90+ BLUE_DARK = '#1A6CB0'
91+ GRAY_DARK = '#666677'
92+
93+ PPM_LIGHT_RC = {
94+ 'figure.facecolor' : BG_LIGHT ,
95+ 'axes.facecolor' : PANEL_LIGHT ,
96+ 'axes.edgecolor' : TEXT_DARK ,
97+ 'axes.labelcolor' : TEXT_DARK ,
98+ 'text.color' : TEXT_DARK ,
99+ 'xtick.color' : TEXT_DARK ,
100+ 'ytick.color' : TEXT_DARK ,
101+ 'grid.color' : GRID_LIGHT ,
102+ 'grid.alpha' : 0.6 ,
103+ 'legend.facecolor' : PANEL_LIGHT ,
104+ 'legend.edgecolor' : GRAY_DARK ,
105+ 'legend.labelcolor' : TEXT_DARK ,
106+ 'font.family' : 'serif' ,
107+ 'font.size' : 11 ,
108+ 'axes.titlesize' : 13 ,
109+ 'axes.labelsize' : 12 ,
110+ 'savefig.facecolor' : BG_LIGHT ,
111+ 'savefig.edgecolor' : BG_LIGHT ,
112+ 'savefig.dpi' : 200 ,
113+ 'savefig.bbox' : 'tight' ,
114+ 'savefig.pad_inches' : 0.15 ,
115+ }
116+
117+
118+ def apply_light_style ():
119+ """Apply PPM light-theme matplotlib style (for prose-figure mode)."""
120+ mpl .rcParams .update (PPM_LIGHT_RC )
121+
122+
73123def new_figure (width = 8 , height = 5 , ** kwargs ):
74124 """Create a new figure with PPM styling."""
75125 apply_style ()
0 commit comments