Python으로 배우는 Plotly 데이터 시각화 입문
Alex Scriven
Data Scientist
$$

$$
add_annotation() 사용$$
update_layout()와 annotations 인수 사용text - 표시할 실제 텍스트$$
x, y - 주석 위치 지정$$
showarrow = True/False - 화살표 표시 여부$$
🛑 절대 위치 배치는 주의하십시오. 데이터가 바뀌면 겹칠 수 있습니다
x, y는 플롯의 데이터 값을 의미합니다$$
xref, yref를 paper로 설정x, y는 플롯 영역의 0~1 비율이 됩니다x=0.5, y=0.5)는 중앙 위치
my_annotation = dict( x=215111, y=449000,showarrow=True, arrowhead=3,text="Our company is doing well", font=dict(size=10, color="black") )fig.update_layout(annotations=[my_annotation]) fig.show()
$$

$$
float_annotation = dict( xref="paper", yref="paper",x=0.5, y=0.8,showarrow=False, text="You should <b>BUY</b>", font=dict(size=15, color="black"), bgcolor="rgb(255,0,0)" )

Python으로 배우는 Plotly 데이터 시각화 입문