그것은 소리) 플롯 할 데이터의 크기를 조정하십시오. 여기 않는 스크립트입니다 :이 예를 들어, 데이터의 경우
#!/usr/bin/env gnuplot
# don't make any output just yet
set terminal unknown
# plot the data file to get information on ranges
plot 'data.dat' title 'My Moneys'
# span of data in x and y
xspan = GPVAL_DATA_X_MAX - GPVAL_DATA_X_MIN
yspan = GPVAL_DATA_Y_MAX - GPVAL_DATA_Y_MIN
# define the values in x and y you want to be one 'equivalent:'
# that is, xequiv units in x and yequiv units in y will make a square plot
xequiv = 100
yequiv = 250
# aspect ratio of plot
ar = yspan/xspan * xequiv/yequiv
# dimension of plot in x and y (pixels)
# for constant height make ydim constant
ydim = 200
xdim = 200/ar
# set the y tic interval
set ytics 100
# set the x and y ranges
set xrange [GPVAL_DATA_X_MIN:GPVAL_DATA_X_MAX]
set yrange [GPVAL_DATA_Y_MIN:GPVAL_DATA_Y_MAX]
# set the labels
set title 'Dollars in buckets'
set xlabel 'number'
set ylabel 'Dollars'
set terminal png size xdim,ydim
set output 'test.png'
set size ratio ar
set style data linespoints
replot
:
0 50
50 150
100 400
150 500
200 300
내가 얻을 다음 줄거리 : 예상대로
그것은 정사각형에 관한 것입니다 (x에서 100 단위를 y에서 250 단위와 같게 정의하고 데이터의 범위는 [(0,200), (50,500)] 범위). 내가 다른 데이터 포인트 (400300)를 추가하면 출력 파일은 예상대로 넓은 :
은 다른 질문에 대답하려면, 따라서 Y 틱 증가 설정할 수 있습니다
set ytics <INCREMENT>
을 위의 스크립트는 예제를 제공합니다.
사이드 노트 : 터미널 명령에서 크기를 정의하면 ('set terminal png size ...') 실제 출력 파일의 크기를 정의하고 'set size ratio'명령은 출력 영역 내의 가로 세로 비율을 설정합니다 플롯이 플롯되어있는 곳. 저는 종횡비가 일관성을 유지할 수 있도록하기 위해 두 가지 작업을 모두했습니다. –
andyras