tikz中如何旋转图形的示例:

测试旋转:\\
\begin{tikzpicture}[line width =2pt]
%原始图
\draw[dashed] (0,0) rectangle (2,2);
%旋转45度,取默认旋转点
\draw[rotate=45] (0,0) rectangle (2,2);
%旋转45度,指定旋转点(2,2)
\draw[rotate around={45:(2,2)},blue] (0,0) rectangle (2,2);
%辅助信息
\draw[fill=red] (0,0) circle (4pt);
\draw[fill=green](2,2) circle (4pt);
\node[below] (nodea) at (0,0){$(0,0)$};
\node[above] (nodeb) at (2,2){$(2,2)$};
\end{tikzpicture}


 

运行结果为:

 

[latex]PGF 和 tikz中如何旋转图形的示例

旋转node也可一样设置

 

相关文章:

  • 2022-01-08
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2021-05-26
  • 2022-12-23
  • 2022-01-07
  • 2021-09-18
猜你喜欢
  • 2022-01-23
  • 2021-12-14
  • 2021-08-17
  • 2021-07-23
  • 2021-09-19
相关资源
相似解决方案