C4d移动坐标轴:坐标轴的箭头(arrow mathematica)

关于C4d移动坐标轴的问题,在arrow mathematica中经常遇到, 在 Mathematica 中使用命令绘图时如何获取轴的箭头?

在 Mathematica 中使用命令绘图时如何获取轴的箭头?

感谢您的任何有用的答案。

18

对于 2D 图,例如由 Plot 生成的以下作品很棒:

Plot[Sin[x], {x, 0, 10}, AxesStyle -> Arrowheads[0.07]]

enter image description here

或自定义箭头:

h = Graphics[Line[{{-1, 1/2}, {0, 0}, {-1, -1/2}}]];
Plot[Sin[x], {x, 0, 10}, 
 AxesStyle -> Arrowheads[{{Automatic, Automatic, h}}]]

enter image description here

7

基于 Sjoerd 的答案,

一个情节,如

enter image description here

可以按如下方式获得 (例如):

       Plot[Sin[x], {x, -2\[Pi], 2 \[Pi]},
 AxesStyle-> { 
Directive[{Red,
Arrowheads[{{-0.06,0(*Xleft*),{Graphics[{
Polygon[
{{-1,0.5`},{0,0},{-1,-0.5`}}]}],0.98`}},
{0.03,.9(*Xright*),{Graphics[{
Polygon[
{{-1,0.5`},{0,0},{-1,-0.5`}}]}],0.98`}}}]}], 
Directive[{Blue,
Arrowheads[{{-0.05,0(*Ydown*),{Graphics[{
Polygon[
{{-1,0.5`},{0,0},{-1,-0.5`}}]}],0.98`}},{0.03,.8(*Yup*),{Graphics[{
Polygon[
{{-1,0.5`},{0,0},{-1,-0.5`}}]}],0.98`}}}]}
]}]

Drawings ToolsGraphics Inspector中给出了很好的箭头示例。可能有更好的获取信息的方法,但是我annotate a plot用我喜欢的箭头,然后抽象(使用来自 Simon 的suggestion):

Cases["Paste-Graphic_Here", Arrowheads[___], Infinity]

再举一个例子:

enter image description here

代码如下

Plot[Sin[x], {x, -2\[Pi],2 \[Pi]}, 
AxesStyle-> { Directive[{Red,
Arrowheads[{{-0.06,0.1(*Xleft*),
{Graphics[{arrowhead}]/.arrowhead-> arrowhead2,0.98`}},
{0.05,0.95(*Xright*),
{Graphics[{arrowhead}],0.98`}}}]/.arrowhead-> arrowhead4}], 
Directive[{Blue,
Arrowheads[{{-0.05,0(*Ydown*),
{Graphics[{arrowhead}]/.arrowhead-> arrowhead3,0.98`}},{0.03,.8(*Yup*),
{Graphics[{arrowhead}]/.arrowhead-> arrowhead1,0.98`}}}]}
]}]
where
arrowhead1=Polygon[{{-1,0.5`},{0,0},{-1,-0.5`}}];
arrowhead2=Polygon[{{-1.5833333333333333`,0.4166666666666667`},{-1.5410500000000003`,0.369283333333333`},{-1.448333333333333`,0.255583333333333`},{-1.3991000000000005`,0.18721666666666673`},{-1.3564666666666663`,0.11826666666666673`},{-1.3268499999999999`,0.05408333333333341`},{-1.3166666666666667`,0.`},{-1.3268499999999999`,-0.048950000000000195`},{-1.3564666666666663`,-0.11228333333333372`},{-1.3991000000000005`,-0.18353333333333333`},{-1.448333333333333`,-0.2562833333333335`},{-1.5410500000000003`,-0.38048333333333345`},{-1.5833333333333333`,-0.43333333333333335`},{0.`,0.`},{-1.5833333333333333`,0.4166666666666667`},{-1.5833333333333333`,0.4166666666666667`}}];
arrowhead3=Polygon[{{-1,0.5`},{0,0},{-1,-0.5`},{-0.6`,0},{-1,0.5`}}];
arrowhead4={{FaceForm[GrayLevel[1]],Polygon[{{-0.6`,0},{-1.`,0.5`},{0.`,0},{-1.`,-0.5`},{-0.6`,0}}],Line[{{-0.6`,0},{-1.`,0.5`},{0.`,0},{-1.`,-0.5`},{-0.6`,0}}]}};
arrowhead5=Polygon[{{-0.6582278481012658`,-0.43037974683544306`},{0.`,0.`},{0.`,0.`},{0.`,0.`},{0.`,0.`},{0.`,0.`},{-0.6455696202531646`,0.43037974683544306`},{-0.4810126582278481`,0.`},{-0.6582278481012658`,-0.43037974683544306`},{-0.6582278481012658`,-0.43037974683544306`}}];

箭头 1 到 5 的列表:

enter image description here

5

Here您在https://math.stackexchange.com/中发布了一个解决方案

由于参考中的解决方案适用于 Plot3D,因此我在这里修改(但没有改进)了 Plot []:

axes[x_, y_, f_, a_] := 
 Graphics[Join[{Arrowheads[a]}, 
   Arrow[{{0, 0}, #}] & /@ {{x, 0}, {0, y}}, 
   {Text[Style["x", FontSize -> Scaled[f]], {0.9*x, 0.1*y}], 
    Text[Style["y", FontSize -> Scaled[f]], {0.1 x, 0.95*y}]
   }]]
Show[Plot[Exp[-x^2], {x, -2, 2}, 
       Axes -> None, 
       PlotRange -> {{-2.1, 2.1}, {-.1, 1.1}}], 
     axes[2, 1, 0.05, 0.02]
]

enter image description here

本站系公益性非盈利分享网址,本文来自用户投稿,不代表码文网立场,如若转载,请注明出处

(669)
Caj文件怎样打开:我怎样才能用 C#打开类的形式(open the class form)
上一篇
Cosplay美足:绿足 用“这个”(greenfoot)
下一篇

相关推荐

  • mathematica 编程:如何使用 Mathematica 来解决复杂的数学问题?

    Mathematica 编程是一种使用 Mathematica 语言来编写程序的过程。Mathematica 是一种功能强大的数学计算软件,它可以帮助科学家、工程师和数学家解决各种复杂的数学问题。…

    2023-05-14 01:43:12
    0 79 73
  • Cool math game:无法动态显示我的蛇游戏的分数

    关于Cool math game的问题,在snake game on cool math中经常遇到,嘿,伙计们,每次蛇成为食物时,我都试图在页面上显示用户得分。我有 div 与类“score”这个 div 被存储为全局const score = document.querySelector('.score');。然后在运行游戏的函数中,我有//increase score points++; score.innerText = points;,它位于测试蛇是否吃了食物的条件内。没有显示吗?…

    2022-12-07 10:16:43
    0 92 21
  • Auto turn:开启 /关闭/自动闪光模式(automathic)

    关于Auto turn的问题,在automathic中经常遇到,我试图在三种方法之间切换以打开 / 关闭和自动拍摄我的相机应用程序中的闪光灯..我会像在谷歌相机应用程序中一样只使用一个按钮进行切换。点击第一次,你关闭,第二次你将打开它,第三次你将在自动拍摄中设置它。我创建了按钮,我做了这个方法来改变图标:…

    2022-12-15 04:04:06
    0 55 53
  • Cscx的不定积分是多少:Mathematica中的定积分与不定积分的区别

    关于Cscx的不定积分是多少的问题,在difference between definite and indefinite integral中经常遇到,我注意到 mathematica 会在某些定积分上 chokes 灭,但是如果我做一个无限积分并减去结果函数的极限值,它很容易给我一个答案。…

    2022-12-07 13:45:13
    0 15 72
  • C喷是啥:是为C或C++

    关于C喷是啥的问题,在c++ math.h中经常遇到,我需要在.cpp(c ++)源文件中使用自然对数函数。现在,当然我可以通过快速的 google 搜索和简单的库解决方案来做到这一点。但我有点困惑...…

    2022-12-15 13:01:04
    0 45 80
  • C位出道表情包:找不到包数学 /位(math bits)

    关于C位出道表情包的问题,在math bits中经常遇到,当我执行测试时,我收到以下错误。这是以前的工作。不知道我需要做什么来修复这个错误。…

    2022-12-19 00:28:49
    0 29 95
  • 在 Mathematica中提取函数的临界点

    让我们进一步考虑使用的函数f[x]:=x^3要在 Mathematica 中找到此函数的最大值,我们可以使用FindMaximum[f[x],x]/,它显示结果{2.093608796950724*10^313,{x->2.75612*10^104}}。这表明x=2.75612*10^104是f(x)的临界值。…

    2022-11-11 15:20:25
    0 67 79
  • 硬币数学转换问题(coinmath)

    我目前正在编写一个程序,将便士转换为正确的数字二十年代,十,五,美元,季度,角钱,镍币和便士。我已经得到了程序的第一部分正确,但一旦我得到美元,我的数学没有输出正确的金额。有什么帮助吗?…

    2022-11-21 03:46:35
    0 25 72

发表评论

登录 后才能评论

评论列表(27条)