Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

map png save uses wrong height #392

Closed
bernstei opened this issue Nov 12, 2024 · 4 comments · Fixed by #393
Closed

map png save uses wrong height #392

bernstei opened this issue Nov 12, 2024 · 4 comments · Fixed by #393
Labels
component-map Issues related to the map component

Comments

@bernstei
Copy link
Collaborator

bernstei commented Nov 12, 2024

The map png save button uses the width for both the width and the height of the saved bitmap. svg seems to use width for width and height for height, as I'd have expected.

height: Math.max(gd._fullLayout.width, 600),

@bernstei bernstei changed the title map png uses wrong height map png save uses wrong height Nov 12, 2024
@bernstei
Copy link
Collaborator Author

Also, on the same note (but perhaps worth a different issue) - it would be nice to have control over the default resolution, currently always 600, when the physical display isn't big enough.

@Luthaf Luthaf added the component-map Issues related to the map component label Nov 13, 2024
@Luthaf
Copy link
Contributor

Luthaf commented Nov 13, 2024

This looks like a typo. As a simple fix for the resolution, we could try to use the double of the current size. I'll need to check if plotly will actually render a higher resolution image though.

@bernstei
Copy link
Collaborator Author

I've definitely changed the 600 -> 1200. or 2400 in the web version, by editing map.ts, and the output is higher resolution. The problem is that the glyph sizes (and font sizes, I think) are apparently fixed in pixels, so they look smaller in the output. There's a scale parameter that I think would address this, but it's only in the python plotly output function, not in the TS interface that's used by chemiscope.

@Luthaf
Copy link
Contributor

Luthaf commented Nov 13, 2024

Actually, the JS function accepts a scale parameter, but it is not documented. This should be fixed in #393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component-map Issues related to the map component
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants