> For the complete documentation index, see [llms.txt](https://codebook.horang.it/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codebook.horang.it/data/undefined-4-1-1.md).

# \[그래프] 꺾은선그래프 그리기

### 코드

```
@그래프 (데이터) "가로축"별 "세로축"으로 꺾은선그래프 그리기
```

***

### 설명

가로축과 세로축을 지정해서 꺾은선그래프를 그릴 때 사용해요.

***

### 주의사항

* 가로축/세로축은 실제 속성과 이름이 동일해야 해요.
* 세로축의 값은 숫자형이어야 해요.

***

### 파이썬 대응 코드

```
import matplotlib.pyplot as plt
plt.plot(df[label_key], df[value_key])
plt.show()
```

***

### 예시

{% code title="예시 코드" %}

```
인구데이터 = @데이터 "2026년 3월 행정구역별 인구수" 불러오기
@그래프 인구데이터 "행정구역"별 "인구"로 꺾은선그래프 그리기
```

{% endcode %}

{% code title="예시 코드의 결과" %}

```
(행정구역별 인구수를 보여주는 꺾은선그래프가 표시돼요.)
```

{% endcode %}

***

### 검색 키워드

꺾은선그래프
