Skip to content

The Output of savefig() Does Not Use the Layout Dimensions #491

Open
@RoyiAvital

Description

@RoyiAvital

I create a simple graph with where I set the following layout:

oLayout = Layout(title = "Localization by Range Measurements: Scenario", width = 600, height = 600, 
                xaxis_range = [0, tuGridSize[1]], yaxis_range = [0, tuGridSize[2]], xaxis_title = 'x', yaxis_title = 'y',
                hovermode = "closest", margin = attr(l = 50, r = 50, b = 50, t = 50, pad = 0),
                legend = attr(x = 0.025, y = 0.975), shapes = oShp);
hP = Plot([oTr1, oTr2, oTr3, oTr4], oLayout);
display(hP);

When I save the figure, using savefig(hP, "MyFile.png"); the output neither honor the layout aspect ratio nor the pixels dimension.

Yet documentation says:

image

I'd assume it would take the values from layout.

Metadata

Metadata

Assignees

No one assigned

    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