Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

do_nd: save plot with 'tight' bbox #4360

Merged
merged 3 commits into from
Jul 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
add: bbox_inches='tight'
  • Loading branch information
Thorvald Larsen authored and astafan8 committed Jul 6, 2022
commit 83b5598caecb9746faf8737104c2cc4dc37a3d90
4 changes: 2 additions & 2 deletions qcodes/dataset/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,10 +340,10 @@ def plot_and_save_image(
for i, ax in enumerate(axes):
if save_pdf:
full_path = os.path.join(pdf_dif, f"{dataid}_{i}.pdf")
ax.figure.savefig(full_path, dpi=500)
ax.figure.savefig(full_path, dpi=500, bbox_inches='tight')
if save_png:
full_path = os.path.join(png_dir, f"{dataid}_{i}.png")
ax.figure.savefig(full_path, dpi=500)
ax.figure.savefig(full_path, dpi=500, bbox_inches='tight')
res = data, axes, cbs
return res

Expand Down