gpt4 book ai didi

带有 gnuplot : only one cruve plotted in an animation whereas 2 expected 的动画

转载 作者:行者123 更新时间:2023-12-04 23:09:52 25 4
gpt4 key购买 nike

我有以下脚本,预计会产生 2 条曲线的动画:

#!/bin/bash

for i in {1..397}; do
gnuplot -p <<-EOFMarker
set terminal png;
set output "pic$i.png";
set title "power spectrum";
set xlabel "scale (k)";
set ylabel "P(k)";
set key top left;
set grid;
set ytics out nomirror;
set xtics out nomirror;
set logscale x;
set logscale y;
set format x "10^{%L}";
set yrange [0:30000];
plot "CAMB-1.3.5/matter_camb$i" u 1:2 w l;
replot "EFTCAMB_v3_beta/matter_eftcamb$i" u 1:2 w l;
EOFMarker
done

# Build movie with ffmpeg
ffmpeg -start_number 1 -i pic%d.png movie.mpeg
除了在动画中仅绘制一条曲线(CAMB-1.3.5)之外,每项工作都很好:
这是一个框架示例:
enter image description here
为什么生成的图像中没有考虑“ replot”命令?

最佳答案

只是为了 SO 规则“评论中没有答案”:
查看 help plot :

Syntax: 

plot {<ranges>} <plot-element> {, <plot-element>, <plot-element>}

Examples: 

plot sin(x)
plot sin(x), cos(x)
plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x)
plot "datafile.1" with lines, "datafile.2" with points
plot [t=1:10] [-pi:pi*2] tan(t), \
"data.1" using (tan($2)):($3/$4) smooth csplines \
axes x1y2 notitle with lines 5
plot for [datafile in "spinach.dat broccoli.dat"] datafile

关于带有 gnuplot : only one cruve plotted in an animation whereas 2 expected 的动画,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/72391854/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com