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

How to export sample.clone_vs_analyte plot #15

Open
Calime95 opened this issue Apr 25, 2023 · 1 comment
Open

How to export sample.clone_vs_analyte plot #15

Calime95 opened this issue Apr 25, 2023 · 1 comment

Comments

@Calime95
Copy link

Hello,
I'm trying to export a high resolution plot from the sample.clone_vs_analyte function, but it seems that the plot is "NoneType" and has no attribute "save".
Is there a way to export this image as high resolution TIFF and/or as PDF? I already tried to open the plot in a new webpage and print it as PDF, but the quality is not the best.

Thanks!

@KKJSP
Copy link
Collaborator

KKJSP commented Apr 25, 2023

As of now, the clone_vs_analyte plot is created using matplotlib. It can be saved as follows:

import matplotlib.pyplot as plt

sample.clone_vs_analyte("protein")
fig = plt.gcf()  # GetCurrentFigure
fig.savefig("name.pdf", bbox_inches="tight")  # .png, .jpg, .svg are allowed, but .tiff is not

Other options for savefig can be found here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants