如何在茱莉亚图中更改刻度线的精度 [英] How to change the precision of ticks in julia plot
问题描述
我是第一次在julia中进行绘图,并且已经安装了Juno IDE.我正在使用Plots.jl进行绘制,每次绘制时,y轴运动轨迹都有很多小数点.
I'm plotting in julia for the first time and have installed the Juno IDE. I'm plotting with Plots.jl and every time I plot, the y-axis tics have lots of decimals.
我尝试了多个后端,例如GR,Plotly,PlotlyJS,但是没有一个可以改变我所看到的行为.
I've tried multiple backends, like GR, Plotly, PlotlyJS, but none have changed the behavior I'm seeing.
这是我目前正在产生结果的代码:
This is the code I have currently producing my results:
using Plots
gr()
x = 1:10; y = rand(10)
p = plot(x,y)
输出的数字: https://github.com/bojohnson02/Random/blob/master/fig. pdf
推荐答案
这是由Showoff(Plots用于创建轴刻度)的程序包的某些更改引起的临时错误.它应该已经固定,因此更新软件包应该可以(]up
).如果还不行,并且您很着急,则安装两个软件包中的master
应该可以解决问题(] add Plots#master
后跟] add Showoff#master
).
That's a temporary bug caused by some changes to Showoff, the package that Plots uses to create the axis ticks. It should be fixed already, so updating your packages should work (]up
). If it doesn't work yet, and you're in a hurry, installing master
of the two packages should do the trick (] add Plots#master
followed by ] add Showoff#master
).
这篇关于如何在茱莉亚图中更改刻度线的精度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!