Forgot password?
 Register account
View 7446|Reply 16

请教tikz中node的位置怎么调

[Copy link]

411

Threads

1619

Posts

110K

Credits

Credits
11813

Show all posts

abababa Posted 2015-10-19 10:54 |Read mode
如题,例如画一个点$A$:
  1. \coordinate (A) at (1,1);
  2. \fill(A) circle (1.5pt)node[below]{$A$};
Copy the Code
这里的node是只有left,right,above,below四个选项吗?如果想任意摆放这个字母$A$的位置,要怎么做呢?比如想让$A$在这个点的右上方,或者是沿着$(0,0)$到$(2,1)$的方向。

13

Threads

901

Posts

110K

Credits

Credits
12272

Show all posts

色k Posted 2015-10-19 14:29
还可以用 shift ,比如说
... node[shift={(30:7pt)}] ...

13

Threads

901

Posts

110K

Credits

Credits
12272

Show all posts

色k Posted 2015-10-19 14:56
之前我嫌麻烦而自定义命令来简化输入,见 forum.php?mod=viewthread&tid=138

768

Threads

4685

Posts

310K

Credits

Credits
35004

Show all posts

isee Posted 2015-10-19 15:41
可以任意位置,右上方就是 [above right]

如果不想看手册的话,“曲线”标法为另找一点,标此点上(不含任何参数),但不推荐这种标法,回头再看源文档时,会一时反映不过来。。。。

411

Threads

1619

Posts

110K

Credits

Credits
11813

Show all posts

 Author| abababa Posted 2015-10-19 15:51
谢谢,shift的标法挺好的,随意位置都能标了。
就一个文档用了,暂时其它的还是用geogebra来画,导出的tikz觉得太乱了。要是能把geogebra里的那些命令都在tikz里自定义就好了,把geogebra的命令直接一复制,重名的加个前缀就直接画出来了。

682

Threads

110K

Posts

910K

Credits

Credits
90973
QQ

Show all posts

kuing Posted 2015-10-19 17:39
回复 4# isee

left,right,above,below 组合也就8个方位,那也算任意位置咩?……

768

Threads

4685

Posts

310K

Credits

Credits
35004

Show all posts

isee Posted 2015-10-19 17:43
个人喜欢用label。

coordinate,node 都支持

768

Threads

4685

Posts

310K

Credits

Credits
35004

Show all posts

isee Posted 2015-10-19 18:11
回复  isee

left,right,above,below 组合也就8个方位,那也算任意位置咩?……
kuing 发表于 2015-10-19 17:39
当然不是说的默认参数啦。

768

Threads

4685

Posts

310K

Credits

Credits
35004

Show all posts

isee Posted 2015-10-19 18:42
这是TiKZ不方便的地方,也是TiKZ方便的地方,完全可以由自己来控制。

不过,仅就绘制几何图来说,这八个方位基本够用,一般是太近而产生重叠,可above right=7 之类的调整距离。

13

Threads

901

Posts

110K

Credits

Credits
12272

Show all posts

色k Posted 2015-10-19 21:18
回复 9# isee

我觉得不够用,而且像 above right 这类的距离有时会感觉太大,所以我自定义时用极坐标形式,默认距离相同,需要时才调整。

67

Threads

407

Posts

3537

Credits

Credits
3537

Show all posts

Tesla35 Posted 2018-9-16 18:42
可以

13

Threads

901

Posts

110K

Credits

Credits
12272

Show all posts

色k Posted 2018-9-16 20:03
回复 11# Tesla35

啥可以?

768

Threads

4685

Posts

310K

Credits

Credits
35004

Show all posts

isee Posted 2018-9-21 00:07
回复 12# 色k


35应该是标字母,碰到要调位置了。。。。

67

Threads

407

Posts

3537

Credits

Credits
3537

Show all posts

Tesla35 Posted 2018-12-5 18:53
回复 13# isee

正解

768

Threads

4685

Posts

310K

Credits

Credits
35004

Show all posts

isee Posted 2021-5-31 20:37
可以任意位置,右上方就是 [above right]

如果不想看手册的话,“曲线”标法为另找一点,标此点上(不含任 ...
isee 发表于 2015-10-19 15:41
继续2#
若在coordinate中,label 后需一个{} shift 需要在[]中   
\coordinate [label={[shift={(-130:15pt)}]:{A}}] (a) at (0,0);

(原来[[]]可套着用,只是第二个参数15pt,漂移不定,看来label 适用简单的位置标签)

682

Threads

110K

Posts

910K

Credits

Credits
90973
QQ

Show all posts

kuing Posted 2021-5-31 23:54
回复 15# isee

大中小括号套来套去,有点眼花……

411

Threads

1619

Posts

110K

Credits

Credits
11813

Show all posts

 Author| abababa Posted 2021-6-1 09:14
以前还想着怎么调得好看一些,现在字母一多,有时连标都不愿意标出了,只要不特别和线重叠,就那样吧,唉

Mobile version|Discuz Math Forum

2025-6-5 01:12 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit