← 수업 제작 도구
홈 › Components › Graph and Graphing Calc › 화면 22

화면 22. Graph.yAxisLabel [sink]

원본: Computation Layer 문서(Graph) · Try It (원본 화면)

화면 번호22 / 29
문서 항목 설명 (원문)Sets the string we display along the y-axis. This overrides any user interaction, so we caution against using it with fullscreen graphs.

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 22 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그래프그래프
# This will look at certain cells in a table
# and use the contents there to set the y-axis
# label.
▷ 표의 특정 칸을 읽어서 그 내용으로 y축 이름을 정한다.

yAxisLabel: "Remaining Ice Cream (${yAxisLabelTable.cellContent(1,1)})"
▶ y축 이름(yAxisLabel)은 "Remaining Ice Cream (…)"(남은 아이스크림 (…))의 괄호 안에 표 yAxisLabelTable의 1행 1열 칸의 내용을 끼워 넣은 글자("Remaining Ice Cream (${yAxisLabelTable.cellContent(1,1)})")로 한다.
yAxisLabelTable.cellContent(1,1)은 표 yAxisLabelTable의 1행 1열 칸에 적힌 내용을 가져오고, ${ }는 글자 안에 값을 끼워 넣는 표기이다. 표의 1행 1열 칸의 내용이 바뀌면 축 이름도 바뀐다.