산점도
산점도는 각 축에 하나의 측정값을 배치하고 항목마다 점 하나를 표시합니다. "이 두 가지가 서로 관련이 있는가?"라는 질문에 답할 수 있는 유일한 차트이며, 관련이 없는 경우를 포함해 그 답을 있는 그대로 보여 줍니다.
필요하면 범주를 나타내는 색상 차원을 추가할 수 있으며, 크기 차원을 추가하면 버블 차트가 됩니다.
#이 차트가 적합한 경우
#데이터 형식 요구 사항
#실제 예제
서비스별로 색을 구분한, 요청량 대비 응답 시간:
새 다이어그램에 붙여 넣어 편집할 수 있는 소스입니다.
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Latency against throughput by endpoint",
"width": 380,
"height": 260,
"data": {"values": [
{"endpoint": "/orders", "rps": 120, "p95": 240, "service": "api"},
{"endpoint": "/orders/:id", "rps": 310, "p95": 95, "service": "api"},
{"endpoint": "/search", "rps": 85, "p95": 610, "service": "search"},
{"endpoint": "/catalogue", "rps": 420, "p95": 130, "service": "api"},
{"endpoint": "/reports", "rps": 12, "p95": 2400, "service": "reporting"},
{"endpoint": "/export", "rps": 4, "p95": 5200, "service": "reporting"},
{"endpoint": "/suggest", "rps": 190, "p95": 180, "service": "search"}
]},
"mark": {"type": "point", "filled": true, "size": 90},
"encoding": {
"x": {"field": "rps", "type": "quantitative", "title": "Requests per second"},
"y": {"field": "p95", "type": "quantitative", "title": "p95 latency (ms)", "scale": {"type": "log"}},
"color": {"field": "service", "type": "nominal", "title": "Service"},
"tooltip": [{"field": "endpoint"}, {"field": "rps"}, {"field": "p95"}]
}
}
#사용자가 자주 놓치는 몇 가지
상관관계가 인과관계는 아니지만, 산점도는 매우 설득력 있어 보입니다. 실제로 알고 있는 내용만 말하세요.
값이 여러 자릿수에 걸쳐 분포할 때는 로그 스케일이 정직한 선택인 경우가 많습니다.
점이 겹치면 밀도가 가려집니다. 불투명도를 낮추거나 점 크기를 줄이세요.
보기 좋은 차트가 아니라 질문에 맞는 차트를 선택하세요.