Skip to content

Generating a pdf from a graph truncates the image #2481

@rchiodo

Description

@rchiodo

Create a plot that's rather wide (I used this code below):

#%%
from time import sleep
import numpy as np

from livelossplot import PlotLosses

#%%
liveplot = PlotLosses()

for i in range(20):
    liveplot.update({
        'accuracy': 1 - np.random.rand() / (i + 2.),
        'val_accuracy': 1 - np.random.rand() / (i + 0.5),
        'mse': 1. / (i + 2.),
        'val_mse': 1. / (i + 0.5)
    })
    liveplot.draw()
    sleep(1.)

Open the plot viewer
export to PDF

Expected result:
Full image is in the PDF.

Actual result:
image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions