import plotly.graph_objects as go
fig = go.Figure(go.Scatter(
mode = "lines+markers",
y = [4, 1, 3, 1, 10, 3, 7, 11, 5, 7, 8, 2],
x = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December",]))
fig.show()Plotly 차트의 축 tick 회전 및 폰트 변경하기
Plotly x축 tick 회전 및 폰트 변경하기
Data Visualization
Plotly의 x축 tick을 변경하는 방법에 대해서 정리합니다.
Plotly x축 tick 회전시키기
차트의 축에 표시될 tick 값의 길이가 긴 경우 tick을 회전 시키는 것이 좋습니다.
x축과 y축의 tick의 fontsize와 회전을 적용합니다.
fig = go.Figure(go.Scatter(
mode = "lines+markers",
y = [4, 1, 3, 1, 10, 3, 7, 11, 5, 7, 8, 2],
x = [ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December",]))
fig.update_xaxes(
tickangle = 70,
tickfont = {"size": 14},
title_text = "Month",
title_font = {"size": 20},
title_standoff = 25)
fig.update_yaxes(
title_text = "Temperature",
title_standoff = 25)tickfont로 x축의 tick의 글자크기를 설정합니다. title_font는 축 타이틀의 크기를 결정하고 title_standoff는 축과 title사이의 거리를 결정합니다.
| Date | Title | Author |
|---|---|---|
| Aug 18, 2024 | Folium에서 Google Map 사용 방법 | |
| Aug 16, 2024 | Folium의 Choropleth 지도 | |
| Aug 15, 2024 | Folium 마커 생성과 색상 변경하기 | |
| Oct 8, 2023 | Plotly line, shape 그리기 | |
| Oct 5, 2023 | Plotly Funnel(깔대기) 차트 만들기 | |
| Oct 3, 2023 | Plotly 불릿차트 | |
| Oct 2, 2023 | Plotly Hover 설정하기 | |
| Sep 30, 2023 | Plotly Axis 포멧 변경하기 | |
| Sep 28, 2023 | Plotly 마커 모양 변경하기 | |
| Sep 25, 2023 | Plotly Time Series 날짜 범위 UI 사용하기 | |
| Sep 22, 2023 | Plotly Line Plot만들기 | |
| Sep 21, 2023 | Plotly Histogram Plot만들기 | |
| Sep 18, 2023 | Plotly Animation 만들기 | |
| Sep 18, 2023 | Plotly Box Plot만들기 | |
| Sep 17, 2023 | Plotly Treemap 만들기 | |
| Sep 17, 2023 | Plotly Bubble chart 만들기 | |
| Sep 13, 2023 | Plotly Subpolt 만들기 |
No matching items