美文网首页
julia + plots 【annotate -- 给图形加

julia + plots 【annotate -- 给图形加

作者: 昵称违法 | 来源:发表于2020-09-08 14:26 被阅读0次

调用annotate

举例如下:

function annotate_test()
    plot(1:10)
    annotate!(1,1,"1-1")                                 #最简单的写法:x,y,"text"
    annotate!(2,2,"2-2",:red)                            #带【颜色】的写法
    annotate!(3,3,text("3-3", 14, :left, :top, :green))  #带【字号】,【布局】,【颜色】的写法
    annotate!([(4,4,"4-4",:green),(5,5,"5-5",:red)])     #一次标记多个。格式:[(标记1),(标记2),...(标记N)]
end

annotate_test()

image.png

相关文章

网友评论

      本文标题:julia + plots 【annotate -- 给图形加

      本文链接:https://www.haomeiwen.com/subject/rindektx.html