Julia中如何仅移除绘图中的坐标轴数值?

3
在R中,您可以使用以下内容来删除轴值:
x <- 1:20
y <- runif(20)
plot(x, y, axes=FALSE, frame.plot=TRUE)
Axis(side=1, labels=FALSE)
Axis(side=2, labels=FALSE)

输出:

输入图像描述

如此回答中所提到的,您可以通过以下方式删除轴值和刻度标记:

import Pkg
Pkg.add("Plots")
using Plots
# generating vectors
# x-axis
x = 1:10
 
# y-axis
y = rand(10)
 
# simple plotting
plot(x, y, ticks = false)

输出:

在此输入图片描述

是否可能只删除轴上的值而保留刻度线,就像R示例中一样?

1个回答

3

尝试

plot(x, y, formatter=(_...) -> "")  #or:
plot(x, y, formatter=Returns(""))

formatter (以及 xformatteryformatter) 指定了一个用于格式化坐标轴标签的函数。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接