JuliaPlots / JuliaPlots/PlotlyJS.jl

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

Open
#491 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
444
Forks
86
PR merge metrics
No merged PRs in 30d

Description

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

```julia
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](https://github.com/user-attachments/assets/c9afab9c-7e10-41dd-a471-6a0bf79434a7)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.