Hot answers tagged

4

As has been already pointed in comments, sept3 is a sign and oct3 is an arrow and although their minimum width is the same, the distance between oct3.east and setp3.west is not 2*minimum width because sign nodes are "inserted" inside arrow left side. A possible solution for your scheme could be using let to calculate a new minimum width, with \draw let ...


4

We can define an additional style for the first node (or, if it is just one node, you could just apply the settings to the node directly). For example: ringed dot/.style={circle, fill=black, draw, ultra thick, inner sep=1.95pt, double distance=1.5pt, minimum size=7pt} will produce this result: Note that this is an extremely inefficient way to draw ...


4

Another possibility is "one-step" approach, which is (to my opinion) more clear and simple. For it I use TikZ library calc: \documentclass[tikz]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[ every node/.style = {circle, draw=red, thick, minimum size=2mm, inner sep=0pt} ] \draw ...


3

As Peter said, you should add at to specify the coordinates. However, you don't need these extra nodes. You can add the nodes directly to the "bars" above. You can add nodes to any path, and the rectangle is still a path. Output Code \documentclass[margin=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \shade[top ...


3

You could draw the path piecewise: \documentclass[tikz]{standalone} \usetikzlibrary{math} \begin{document} \foreach \mynodes/\numnodes in {{1/0,2/90,3/0}/3}{% \begin{tikzpicture}[scale=1] \draw (-1,-1) [help lines] grid (3,2); % define coordinates for joints \node (0,0)(n0){}; \path (0,0) foreach \nodeid/\nodeangle in \mynodes{ ...


3

May be you can consider using chains library for this kind of graphs. At the same time you add elements to the chain, joins between them are drawn. \documentclass[tikz, border=2mm]{standalone} \usetikzlibrary{chains} \begin{document} \begin{tikzpicture}[% on grid, scale=1, start chain=going right, every join/.style={thick, red, shorten ...


2

This version adopts etoolbox, very powerful package for setting conditions. I guess it could be included in the \tikzset but I'm not sure how yet. I'll edit the answer in case. Output Code \documentclass[margin=10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{tikz} ...


2

Here's a way of doing it with PGF keys and a couple of macros. It allows you to say \tikzset{% S1 set={3,5,8}, S2 set={1,4}, } for example, to determine which nodes should take each of styles S1 and S2. It is probably a bad idea to name nodes using numbers alone, but I've not changed this in the code below. (Giving each a standard prefix is an easy ...


2

With your MWE I can't reproduce your image. Text in nodes are normally vertical spaced: I guess, that in your document you have in preamble determined bigger baseline stretch, something like \renewcommand\baselinestretch{1.5}, which gives approximately the same image as you show in the your question: The cure against this vertical stretching ...


2

Another option is to use a LaTeX box --- never had problems with this (although you probably can't connect to "internal" objects). For simple cases it's quite easy: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows,positioning,calc} \begin{document} \newsavebox{\genericfilt} \savebox{\genericfilt}{% \begin{tikzpicture}[font=\small, ...


2

You can call \usetikzlibrary{positioning} to specify where to place a label. In this case, you want it to the northeast, so you'd specify it as \node[above right=<distance> of \label]. I found a distance of 0 looked nice, but you can adjust it as needed. \begin{tikzpicture} \foreach \i in {1,...,9} { \pgfmathtruncatemacro{\y}{(\i - 1) / 3}; ...


2

There is an svg2tikz extension for inkscape available from https://github.com/kjellmf/svg2tikz I haven't tried it personally so no example here. Jake has an example on site at http://tex.stackexchange.com/a/245839/1090


1

When you are making axis and plots, you can use pgfplots. Here you can also use tikz package, to draw simple figures, by (axis cs: x,y) \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[scale=0.5] \begin{axis}[ axis lines=middle, domain = -8:8, xmin = -8, xmax = 8, ymin = -8, ...


1

If C and D have the same width and height, you could just do this: \documentclass[tikz, border=10pt, multi]{standalone} \usetikzlibrary{shapes.geometric,arrows,positioning,fit} \begin{document} % Define block styles \tikzset{% block/.style = {rectangle, draw, fill=yellow, text width=5em, text centered, rounded corners, minimum height=2em}, line/.style = ...


1

I've changed below to right and changed inner sep= to 3pt in your code: \documentclass[12pt, a4paper]{article} \usepackage[a4paper,top=1 in,bottom=1 in,left=0.7 in,right=0.7 in]{geometry} \usepackage[utf8]{inputenc} %\usepackage[misc]{ifsym} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{graphicx} \usepackage{tikz} ...


1

Frankly said, I do not understand what you doing in your code and what should be your result, so the main purposes of this answer is clarify this. The MWE below generate this picture: where colors are select on basis even/odd number in \label: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath,amsfonts,amssymb} ...


1

Is this what you looking for? Your problem is definition what is minimum width of second "signal". It is a bit tricky ... however, the following code works: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[frenchb]{babel} \usepackage{tikz} ...


1

Like this? The code of above image is: \documentclass[border=3mm, tikz]{standalone} \usetikzlibrary{chains} \begin{document} \begin{tikzpicture}[ start chain = going right, every node/.style = { draw, minimum height=3em, text width=7em, align=center, on chain, join} ] \node {node with\\linebreak}; ...


1

With your code I can't reproduce your image. It looks fine. Anyway, I slightly reduce your code and select new sibling distances. With this changes I obtain the following picture: \documentclass[tikz, border=3mm]{standalone} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[sibling distance=2.8cm,level distance=2.8cm, box/.style={ ...


1

This answer demonstrates two things: that a forest solution obviates the need to specify sibling distances manually - the tree is automatically packed to create a compact and concise form; that the experimental package justtrees can be used to add the labels shown on the right of the original diagram and forest can automatically add the arrows. I don't ...



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