julia - 在 Julia.Plots 中使用 GR 箭头样式
问题描述
我想在使用 GR 后端的 julia Plots 绘制的绘图中注释一个点。我得到了绘制的箭头
plot([(pos1), (pos2)], line=:arrow)
正如预期的那样,这绘制了一个:simple
箭头。但是,我不知道如何获取:filled
或:closed
箭头。我尝试了几种排列:
plt1 = plot([(pos1), (pos2)], line=:arrow, arrow=arrow(:closed))
plt2 = plot([(pos1), (pos2)], line=:arrow, arrow=:closed)
也可以直接调用GR函数
plt3 = plot([(pos1), (pos2)], line=:arrow, arrow_style=arrow(:closed))
plt4 = plot([(pos1), (pos2)], line=:arrow, arrow=arrow_style(:closed))
有没有办法在 Julia.Plots 上切换箭头样式?
解决方案
你只需要摆脱line = :arrow
关键字参数。line
in Plots 是一个神奇的参数,line = :arrow
将arrow = :arrow
在预处理管道期间转换为内部,覆盖提供的箭头属性。
plot(rand(2), rand(2), arrow = :closed, lims = (0, 1))
给
推荐阅读
- java - 在java中找到两个随机数之间的平均值,然后计算一个数字用switch语句滚动了多少次
- sql - Knex 查询返回布尔逻辑
- java - 如何从与 Firebase 数据库同步的 ArrayList 中删除条目?
- mysql - 为什么mysql的更新锁什么都不做?
- symfony - Symfony 表单构建器 - 如何将表单标题放在 h2 选择器中?
- oracle-data-integrator - 如果我们有 PL/SQL 语言,为什么要使用 odi
- r - geom_line() 在使用分组数据的 ggplot 中不起作用
- angular - 在另一个提供者中使用一个提供者,反之亦然
- c# - c# 布尔序列化问题
- druid - 如何使用 Tranquility 核心 API 向 druid 发送数据?