我正在使用Plots.jl创建热图和直方图 . 例如 . ,
heatmap(labels_x, labels_y, my_data_matrix)
2个问题:
-
如何更改色标上刻度标签的字体?
-
如何更改色标中值的范围? (我知道它们会自动跨越所有值,但有时你会想要不同的东西,例如,你想要两个热图/直方图具有相同的比例,以便它们可以轻松比较 . )
例如,可以改变轴上刻度标签的字体
plot!(xtickfont=font(36, "Courier"))
但我想改变比例尺上的刻度字体 . (ztickfont不起作用 . )
这里列出了属性:https://juliaplots.github.io/attributes/我没有't see anything that appears to be what I want, but please point me to the right one if it'那里 . 谢谢 .
1 回答
正如@tbreloff在评论中指出的那样,问题#2的答案是使用
clims
关键字 . #1的答案是,在https://github.com/JuliaPlots/Plots.jl/pull/1108之后,颜色条中的tickfont与情节's tickfont, in the pyplot backend - we'相同,以便将其包含在其他后端中 .