Created
June 22, 2021 09:08
-
-
Save janbenetka/2a672a06f615490bc6f30ef01ba79438 to your computer and use it in GitHub Desktop.
[Polar/Radar plot in plotly] #plotly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.graph_objects as go | |
categories = ['accommodation','financial','tourism', | |
'shopping', 'food&drinks'] | |
fig = go.Figure() | |
fig.add_trace(go.Scatterpolar( | |
r=[1, 5, 2, 2, 3], | |
theta=categories, | |
fill='toself', | |
name='Product A' | |
)) | |
fig.add_trace(go.Scatterpolar( | |
r=[4, 3, 2.5, 1, 2], | |
theta=categories, | |
fill='toself', | |
name='Product B' | |
)) | |
fig.update_layout( | |
polar=dict( | |
radialaxis=dict( | |
visible=True, | |
range=[0, 5] | |
)), | |
showlegend=False | |
) | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment