gpt4 book ai didi

plot - gnuplot - 将分数放入 Axis 标签

转载 作者:行者123 更新时间:2023-12-03 21:39:47 24 4
gpt4 key购买 nike

我有一个对数图,从 1/32 开始以 2 的幂计算。

如何使 Axis 标签 < 1 显示为分数,而不是小数(例如 1/32 而不是 0.03125)?

最佳答案

您必须手动单独标记抽动:

set xtics ("1/2" .5, "1/4" 0.25, "1/8" .125, ...)

或自动:
set logsc x; set xr [1./32:1]
set xtics ("1",1) # remove all tics and set one initial tic
do for [i=1:5] {set xtics add (sprintf("1/%.f",2**i) 1./2**i)}
plot x

关于plot - gnuplot - 将分数放入 Axis 标签,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36529167/

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