Cloufield / gwaslab

A Python package for handling and visualizing GWAS summary statistics. https://cloufield.github.io/gwaslab/
GNU General Public License v3.0
162 stars 25 forks source link

Save scatter plot #30

Open michaelofrancis opened 1 year ago

michaelofrancis commented 1 year ago

Is there a parameter to output and save the scatterplot? https://cloufield.github.io/gwaslab/EffectSize/

Cloufield commented 1 year ago

Hi, For the current version, you can save it like this:

a = gl.compare_effect(...)
a[0].savefig(...)

a[0] here is a matplotlib figure object. I will add parameters for saving in the next version.

Cloufield commented 1 year ago

Hi, from v3.4.17, you can save the plot by adding save and saveargs like

gl.compare_effect(
                   ...
                  save = "myplot.png",
                  saveargs= {"dpi":300,"facecolor":"white"}
)

Thanks for the comment!

chenyangjjj commented 1 year ago

Hi, Does the figargs/saveargs provide the argument for figure units, "in", "cm", "mm", "px"?