Forgot password?
 Create new account
View 7321|Reply 16

请教tikz中node的位置怎么调

[Copy link]

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

abababa Posted at 2015-10-19 10:54:16 |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)$的方向。

15

Threads

948

Posts

110K

Credits

Credits
12412

Show all posts

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

15

Threads

948

Posts

110K

Credits

Credits
12412

Show all posts

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

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

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

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

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

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

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

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

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

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

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

coordinate,node 都支持

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

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

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

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

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

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

15

Threads

948

Posts

110K

Credits

Credits
12412

Show all posts

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

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

65

Threads

414

Posts

3556

Credits

Credits
3556

Show all posts

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

15

Threads

948

Posts

110K

Credits

Credits
12412

Show all posts

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

啥可以?

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

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


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

65

Threads

414

Posts

3556

Credits

Credits
3556

Show all posts

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

正解

801

Threads

4889

Posts

310K

Credits

Credits
36169

Show all posts

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

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

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

701

Threads

110K

Posts

910K

Credits

Credits
94172
QQ

Show all posts

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

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

418

Threads

1628

Posts

110K

Credits

Credits
11891

Show all posts

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

手机版Mobile version|Leisure Math Forum

2025-4-20 22:06 GMT+8

Powered by Discuz!

× Quick Reply To Top Return to the list