赞
踩
tikz生成的图片只能是嵌入在pdf中的,要想转换成其他格式还需要额外的处理,例如使用imagegick.
见上图,使用right of可以精确的控制legend的位置。上图就是精确的将legend控制在了点(-1, 2)右侧.
只能通过第三方开源的插件或软件svg2tikz实现导出tikz code
冒号代表极坐标,上面的意思是坐标(1,140度)处
\foreach \x/\y in {0/0,0/1}这样可以实现多个参数的传递
我想实现的:
1.节点距离自由控制;
2.字体自由控制
\itshape的意思就是意大利斜体。
我观看的教学视频
问题:画折线找坐标时可以坐标重置,那么画流程图可不可以呢?
\documentclass[a4paper,10pt]{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \usetikzlibrary{shapes.geometric, arrows} \usetikzlibrary{positioning} \tikzstyle{input} = [rectangle,minimum width=2.75cm,minimum height=1cm,text centered,text width =3cm,draw=black,ultra thick] \tikzstyle{encoder_convolution_block} = [rectangle,minimum width=3cm,minimum height=0.78cm,text centered,text width =3cm,draw=black,fill=green!32] \tikzstyle{encoder_fc_block} = [rectangle,minimum width=3cm,minimum height=0.78cm,text centered,text width =3cm,draw=black,fill=green!64!yellow] \tikzstyle{decoder_convolution_block} = [rectangle,minimum width=3cm,minimum height=1cm,text centered,text width =3cm,draw=black,fill=blue!35] \tikzstyle{discriminator_convolution_block} = [rectangle,minimum width=3cm,minimum height=1cm,text centered,text width =3cm,draw=black,fill=red!35] \begin{document} \begin{tikzpicture}[node distance=2cm] \node[input] (input) {Input}; \node[encoder_convolution_block, below=of input] (ec1) {3×3,conv,32,/2}; \node[encoder_convolution_block,below=of ec1] (ec2) {3×3,conv,64,/2}; \node[encoder_convolution_block,below=of ec2] (ec3) {3×3,conv,128,/2}; \node[encoder_convolution_block,below=of ec3] (eflat) {Flatten}; \node[encoder_fc_block,below=of eflat] (efc) {fc,16}; \node[encoder_fc_block, left=100pt of efc] (mean) {$\mu_{z}$,16}; \node[encoder_fc_block,below right= of efc] (std) {$\sigma_{z}$,16}; % \node (process1) [process,below of=input1] {Process 1}; % \node (decision1) [decision,below of=process1,yshift=-0.5cm] {Decession 1}; % \node (process2a) [process,below of=decision1,yshift=-0.5cm] {Process 2aaaaaa aaaaaaa aaaa}; % \node (process2b) [process,right of =decision1,xshift=2cm] {Process 2b}; % \node (out1) [io,below of=process2a] {Output}; % \node (stop) [startstop,below of=out1] {Stop}; % \draw [arrow] (start) -- (input1); % \draw [arrow] (input1) -- (process1); % \draw [arrow] (process1) -- (decision1); % \draw [arrow] (decision1) -- node[anchor=east] {yes} (process2a); % \draw [arrow] (decision1) -- node[anchor=south] {no} (process2b); % \draw [arrow] (process2b) |- (process1); % \draw [arrow] (process2a) -- (out1); % \draw [arrow] (out1) -- (stop); \end{tikzpicture} \end{document}
上面代码第六行,如果把这一行删掉,即不导入positioning包,那么会报8个错:Package PGF Math Error: Unknown function `of’ (in ‘of input’).
在不导入positioning包的情况下,数值设置below=10pt功能也不能使用。
见上图,当below right=0cm时,efc的右下角和std的左上角重合。我猜这个0cm的位置参数就是指这两个点的相对距离了。方向应该是正负45度线。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。