通过多图绘制放大gnu图。
但是如果我们在多图中缩放特定的子图怎么办?
这就像是另一个多情节中的多情节。
需要帮助!
答案 0 :(得分:0)
在多重绘图环境中,您可以根据需要创建绘图,使用命令#include <stdio.h>
#include <stdlib.h>
#define READ 10
#define WRITE 11
#define LOAD 20
#define STORE 21
#define ADD 30
#define SUBTRACT 31
#define DIVIDE 32
#define MULTIPLY 33
#define BRANCH 40
#define BRANCHNEG 41
#define BRANCHZERO 42
#define HALT 43
#define CELLS 100
#define RANGE 9999
#define SENTINEL -1
#define DEBUG 0
short RangeCheck(short word, short min, short max);
char* prntword(short word);
bool read(short *data, bool check);
int main()
{
bool error = false;
char *word, OperationCode, Operand;
short memory[CELLS], InstructionRegister;
int counter, Accumulator;
Accumulator = 0;
for (int i = 0; i < CELLS; i++) {
memory[i] = 0;
}
for (counter = 0; !error; counter++); {
counter = RangeCheck(counter, 0, CELLS - 1);
InstructionRegister = memory[counter];
OperationCode = InstructionRegister / 100;
Operand = InstructionRegister % 100;
}
switch(OperationCode) {
case READ:
read(&memory[Operand], false);
break;
case WRITE:
printf("%s\n", word = prntword(memory[Operand]));
break;
case LOAD:
Accumulator = memory[Operand];
break;
case STORE:
memory[Operand] = RangeCheck(Accumulator, -RANGE, RANGE);
break;
case ADD:
Accumulator += memory[Operand];
break;
case SUBTRACT:
Accumulator -= memory[Operand];
break;
case DIVIDE:
Accumulator /= memory[Operand];
break;
case MULTIPLY:
Accumulator *= memory[Operand];
break;
case BRANCH:
break;
}
}
和set origin
设置其位置和大小。
在这个例子中,单个地块是并排放置还是一个放在另一个地方取决于您。
set size
请注意,set terminal pngcairo
set output "multiplot.png"
set samples 1000
set xzeroaxis
set multiplot
set origin 0,0
set size 1,1
set xrange [-15:15]
plot cos(x) * x**2, sin(x) * x**2
set nokey
set origin 0.3, 0.07
set size 0.5, 0.45
set xrange [-2:2]
set yrange [-4:2]
set xtics 1
set ytics 2
replot
set origin 0.45, 0.14
set size 0.3, 0.2
set xrange [-0.1:0.1]
set yrange [-0.002:0.004]
set ytics 0.002
set xtics 0.1
replot
unset multiplot
和origin
的值是相对于完整图片给出的,而不是相对于上一个图。