Skip to content

Plot saving in API mode #96

Description

@DexinYang1998

Hi,

Thanks for your wonderful tools. In practice, I can successfully plot the tracks in Notebook, and I am wondering whether there is a way to save the current plot in PDF format.

Thanks so much for your help!

HiC_frame = HiCMat(HiC, balance = False) + \
    Spacer(0.5) 

with highlights_locus, highlights_cebpa:
    bw_frame = Virtual4C(HiC, "chr7:3512000-35125000") + Title("Virtual4C") + \
        Spacer(0.5) + \
        BigWig(H3K27ac_bw) + MinValue(0) +  Vlines(locus) + Title("H3K27ac") + \
        Spacer(0.5) + \
        BigWig(ATAC_bw) + MinValue(0) +  Vlines(locus) + Title("ATAC") + \
        Spacer(0.5) + \
        BigWig(NKX2_1_bw) + MinValue(0) +  Vlines(locus) + Title("Nkx2-1") + \
        GTF(gtf_mm10)
#frame.plot("chr7:35104964-35161193") 

frame = HiC_frame + bw_frame + XAxis()
frame.plot("chr7:35010000-35200000")

image

Meanwhile, I try to use two different commands with the same genomics coordinates to save figures, but I encountered some errors.

fig = frame.plot("chr7:35010000-35200000")
fig.savefig(fname= "test.pdf")

image

bsr = Browser(frame, reference_genome = "mm10")
bsr.goto("chr7:35010000-35200000")
bsr.save("test.pdf")

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions