선릉역 1번 출구
[D2] 다이어그램 및 도표 생성(1) 본문
다이어그램과 도표를 편하게 생성할 수 있는 D2(diagram scripting language).
https://play.d2lang.com/?script=qlDQtVOo5AIEAAD__w%3D%3D&
1. 방향 그래프 생성
x--y
x -> y
x <-> y
dogs -> cats -> mice: chase
위와 같은 구문을 통해 3개의 연결도 생성 가능
2. 화살표에 관계 표시하기
x: choideu
y: peach
x -> y: eat
2-1. 화살표 꾸미기
a <-> b: To err is human, to moo bovine {
source-arrowhead: 1
target-arrowhead: * {
shape: diamond
}
}
글 작성 이후에 중괄호를 이용해서 화살표 꾸미기 가능
3. 도형 shape 지정 방법
1. donut: {shape: circle}
2. database.shape: cylinder
3. you: {
shape: person
}
응용 버전
x: choideu {shape: person}
y: peach {shape: cylinder}
x -> y: eat {
source-arrowhead: 1
target-arrowhead: * {shape: diamond}
}
'etc' 카테고리의 다른 글
[D2] 다이어그램 및 도표 생성(2) (0) | 2023.01.25 |
---|---|
취업 (0) | 2022.03.15 |
Comments