Tag Info

Hot answers tagged

8

This is very similary to one of the tutorials in the pgf manual. You should specify the text height and depth, preferrably via ex units: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[text height=1.5ex,text depth=0.25ex] \node[circle,draw] (A) at (0,0) {A}; \draw[->] (A) -- (-2.5,-2) edge[draw=none] node[near ...


6

If you put both on the outside, one with partially overwrite the other, won't it? \documentclass{standalone} \usepackage{tikz} \usepackage{pgf} \usepackage{pgfplots} \usetikzlibrary{calc, through} \tikzstyle{vertex}=[circle, draw, inner sep=1pt, minimum size=6pt, fill=black!20] \begin{document} \begin{tikzpicture} \foreach \i in {0,1,2}{\node[vertex] (\i) ...


6

Option anchor=base moves the reference point of the node from the middle to the base line with the effect, the nodes are aligned along their base lines. Secondly, the lines does not start at the same heights because of the circular shape of node A. Thus the relative positioning near end should refer to A.center instead to get the same vertical component for ...


6

OK, there is answer, where i take -- to my opinion -- more simple way to draw your picture: \documentclass[tikz]{standalone} \usetikzlibrary{calc,chains} \usepackage{fourier} \begin{document} \begin{tikzpicture}[ node distance=0mm, start chain=going right, box/.style = {name=n#1, draw, minimum height=9mm, text width=17mm, ...


6

To align you need a box of the given width. For this you have to provide text width. If you wish you may also provide minimum width. \node[draw,anchor=north east,align=flush right, minimum height=\BLS,text width=(\LW-1.2cm)*.24] (\j2) at (\i2.south east) {\t}; Full code: \documentclass{article} \usepackage{tikz,fourier} \begin{document} ...


5

Might be easiest to just move the definition of the mes21 and mes31 nodes outside the axis, then they use the coordinate system of the tikzpicture rather than the axis. (I changed the angle to -30.) \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{calc} \usetikzlibrary{positioning} \usepackage{siunitx} ...


4

Things have changed with tikz v3. \documentclass{article} \usepackage{tikz} \usetikzlibrary{snakes,shapes,arrows,matrix,positioning} \tikzset{mynode/.style={circle,draw,font=\small,minimum width=1cm,font=\sffamily} } \begin{document} \begin{figure}[h] \centering \rule[-1.25cm]{0pt}{3.25cm} ...


4

Here is a simple solution via TikZ (as all other solutions...). \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[circle,draw] (A) at (0,0) {A}; \foreach \name[count=\c,evaluate=\c as \xpos using {-3.5+\c}] in {u,...,z}{ \draw[->] (A) -- (\xpos,-2); \path (A.center) -- (\xpos,-2) node[anchor=base,near ...


4

For me the simplest solution would be to use intersections library from TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture} \node[circle,draw] (A) at (0,0) {A}; \draw[name path=u,->] (A) -- (-2.5,-2); \draw[name path=v,->] (A) -- (-1.5,-2); \draw[name path=w,->] (A) -- ( -.5,-2); ...


3

Transform canvas is a hardcore transformation that doesn't respect any bounding box computation or similar well-behaved updates. Hence it transforms like a boss. Here, we came to the conclusion in the comments that you would like the nodes to respect the inner transformation within the scope. That is done by the transform shape i.e. the shape of the node is ...


3

The only way (i know about) to get all nodes to one height is to set the label-nodes to this specific y-value. This way the y-position of the label-node is fixed and the lines are drawn using partway coordinate specifications. The following code is an short example how to do this: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} ...


2

I think I understand your problem with restrict y to domain now, with the default amount of samples no data is actually produced in that y-domain. The simplest solution is to manually specify a different x-domain for that function and/or increase the sampling frequency so the plot is visible also with a restricted y-domain. \documentclass{article} ...


2

In case of doubt, use \leavevmode :) \documentclass[ handout ]{beamer} \usepackage{tikz} \tikzset{ X/.style={rounded corners=5pt, line width=0.75pt, rectangle,text width=4.5cm, align=left, minimum height=3cm,draw}, T/.style={font=\small,text width=4.5cm,anchor=north west} } \newcommand\XBox[1]{% \node[X, ...


2

Under ordinary circumstances node contents are put in a TeX horizontal box. But horizontal boxes cannot contain commands like \vskip so \hbox{A \vskip-5pt B} will produce an error. This is because TeX is in "internal horizontal mode" inside the \hbox and vertical commands (e.g., \vskip) will produce an error (a useful reference for this kind of stuff is ...


2

\documentclass[convert = false,border=3pt]{standalone} \usepackage[american, cuteinductors]{circuitikz} \usepackage{siunitx} \makeatletter \ctikzset{bipoles/vresistorm/height/.initial=.6} \ctikzset{bipoles/vresistorm/width/.initial=.8} ...


2

This is one possible solution. For the arrow, this solution use R then draw an arrow. As to the current direction, use i>^=$f(v_c)$, as shown below in the code. Code \documentclass[convert = false,border=10pt]{standalone} \usepackage[american, cuteinductors]{circuitikz} \usepackage{siunitx} \begin{document} \begin{circuitikz}[scale = 2] \draw ...


1

You were looking for the nodes near coords align parameter. I enclose an example. \documentclass{article} \pagestyle{empty} \usepackage{pgfplots,lipsum} \usepackage{tikz} \pgfplotsset{% /pgfplots/ybar legend/.style={ /pgfplots/legend image code/.code={% \draw[##1,/tikz/.cd,bar width=6pt,yshift=-0.14cm,bar shift=0pt] plot ...


1

I polished the code according to a comment section and this is it. \documentclass[a4paper]{article} \pagestyle{empty} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \usetikzlibrary{calc} \usetikzlibrary{positioning} \pagecolor{white} \tikzset{computenode/.style={red}, a1/.style={blue}, }% End of \tikzset... \def\A{A} \def\dnc[#1, #2, #3, #4]#5{% ...


1

just small variation on Torbjon solution: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} % \pgfplotsset{compat=1.10} \usetikzlibrary{calc,positioning} \usepackage{siunitx} \pgfplotsset{cellmodel/.style={% width=0.4\linewidth, height=0.3\textheight, axis ...


1

Disclaimer: I'm trying to answer my own question despite severe lack of knowledge... After a closer examination of related problems, I have found that combining this and that answer serves as an appropriate answer to my question as well (my question might be marked as duplicate although the respective questions go into a slightly different direction). For ...



Only top voted, non community-wiki answers of a minimum length are eligible