Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- ruby2d
- jetbrains
- CPP
- ruby
- boj
- IntelliJ
- Shell
- 개발노트
- 루비
- Vane
- gnuplot
- JS
- Godot
- Python
- GitHub
- Spring
- C
- react
- plugin
- Android
- kotlin
- gradle
- RaspberryPi
- rubymine
- maven
- Baekjoon
- Java
- OAuth
- OTLanguage
- error
Archives
- Today
- Total
PersesTitan(페르) 기술블로그
[Ruby] 루비에서 그래프 구현하기 (gnuplot 설치) 본문
먼저 homebrew가 설치가 되어 있어야합니다. 그리고 아래 커맨드를 터미널에 입력해서 gnuplot
를 설치해줍니다.
brew install gnuplot
gem install gnuplot
설치 후 아래 코드를 입력하여 실행하여 정상적으로 실행이 된다면 재대로 설치가 끝난 것 입니다.
코드
require 'gnuplot'
Gnuplot.open do |g|
Gnuplot::Plot.new(g) do |plot|
plot.data << Gnuplot::DataSet.new("x") do |d|
d.linewidth = 2
end
end
end
출력
'Language > Ruby' 카테고리의 다른 글
[Ruby] 루비로 cos 그래프 구현하기 (0) | 2023.04.12 |
---|---|
[Ruby] 루비로 sin 그래프 구현하기 (0) | 2023.04.12 |
[Ruby] 루비로 게임 제작해보기 7: 도착 로직 구현 (0) | 2023.01.06 |
[Ruby] 루비로 게임 제작해보기 6-1: 물체 통과 막기 (0) | 2023.01.05 |
[Ruby] 루비로 게임 제작해보기 6: 물체 통과 막기 (0) | 2022.12.28 |