Skip to content

Commit e4e5ec6

Browse files
add transparent background
1 parent f82bc65 commit e4e5ec6

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

codes/python/WaLSAtools/analysis_modules/WaLSA_io.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def WaLSA_save_pdf(fig, pdf_path, color_mode='RGB', dpi=300, bbox_inches=None, p
4242
if bbox_inches is None:
4343
# Save the initial PDF in RGB format
4444
with PdfPages(pdf_path) as pdf:
45-
pdf.savefig(fig)
45+
pdf.savefig(fig, transparent=True)
4646

4747
if color_mode.upper() == 'CMYK':
4848
# Check if Ghostscript is installed
@@ -86,7 +86,8 @@ def WaLSA_save_pdf(fig, pdf_path, color_mode='RGB', dpi=300, bbox_inches=None, p
8686
format='pdf',
8787
dpi=dpi,
8888
bbox_inches=bbox_inches,
89-
pad_inches=pad_inches
89+
pad_inches=pad_inches,
90+
transparent=True
9091
)
9192

9293
if color_mode.upper() == 'CMYK':

examples/python/Worked_examples__NRMP/FIG2__synthetic_data.ipynb

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
},
2828
{
2929
"cell_type": "code",
30-
"execution_count": null,
30+
"execution_count": 1,
3131
"metadata": {},
3232
"outputs": [
3333
{

examples/python/Worked_examples__NRMP/FIG3__walsatools_power_spectra.ipynb

+2-2
Large diffs are not rendered by default.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)