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

Markers are low quality when used with plotly #585

Open
davidshumway opened this issue Jun 15, 2023 · 1 comment
Open

Markers are low quality when used with plotly #585

davidshumway opened this issue Jun 15, 2023 · 1 comment

Comments

@davidshumway
Copy link

The following produces a ~20MB PNG file. However, as seen in the attached image, the marker quality appears to be quite low. Is there any way to easily improve the quality of markers?

import plotly.graph_objects as go
import pandas as pd
tk = '...'
fig = go.Figure()

fig.update_layout(
  width=800, height=1500,
  showlegend=False,
  mapbox=dict(
    accesstoken=tk,
    center=dict(lat=32,lon=-117),
    zoom=11,
    style='light'
  ),
)

fig.add_trace(go.Scattermapbox(
  lat=b['lat'], lon=b['lon'],
  mode='markers',
  marker=go.scattermapbox.Marker(
    size=22,
    color='rgb(242, 177, 172)',
    opacity=0.8,
    symbol=['marker']*23,
    allowoverlap=True,
  ),
  hoverinfo='none'
))

fig.show()
fig.write_image("image.png", scale=10)

image

@davidshumway
Copy link
Author

Here's another example
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant