# Tag Info

4

That's what a node does, and it can have a fill. What's the purpose of the figure environment? \documentclass{article} \usepackage{tikz} \newcommand{\fourcards}[4]{% \begin{figure} \centering \begin{tabular}{cccc} \tikz \node[draw,fill=green!50] {#1}; & \tikz \node[draw,fill=magenta] {#2}; & \...

2

If the color pattern is given by a mathematical function, you might want to plot it using the pgfplots colormap. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[view={0}{90}] \addplot3[surf] {exp(-((x)^2+(y)^2))}; \end{axis} \end{tikzpicture} \end{document}

2

An example with TiKZ and a colorseries from xcolor. \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{calc} \begin{document} \pgfmathsetseed{1} \begin{tikzpicture} \definecolorseries{test}{rgb}{step}[rgb]{.95,.85,.55}{.17,.47,.37} \resetcolorseries[35]{test} \foreach \x in {0,1,...,4}{ \foreach \y in {0,1,...,7} \fill[test!!+] (\x,\y) ...

0

Well, after looking on this and other references, I think, it is too difficult for me than needed. So, I fixed it by using arrow and rectangle... \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows,shapes.geometric,positioning,patterns,arrows.meta} \begin{document} \thispagestyle{empty} \begin{center} \begin{tikzpicture}[ ...

0

@Henri Menke's suggestions was exactly what I needed: TikZ has an external library, which automatically exports any tikzpicture into a pdf file and is highly customizable (chapter 50 of pgf manual). To start using it all one needs is: \usetikzlibrary{external} \tikzexternalize To enable/disable externalization of pictures until the end of the current ...

3

Did you try anchor=mid as I suggested yesterday? Did you try looking it up to find out what it does? Presumably not ... mynode/.style={rectangle, anchor=mid, text height=1em, font=\sffamily, text width=7.5em, align=center, draw}, gives me Now, clearly, you cannot have your cake and eat it. If you align the nodes with .mid then they will be aligned ...

2

You need some text height and text depth as is explained in tutorial Diagram as Simple Graphs from pgfmanual. \documentclass[12pt]{standalone} \usepackage{tikz} \usetikzlibrary{graphs, matrix, arrows.meta} \begin{document} \tikzset{graph/.style={matrix of nodes, inner sep=.25em, row sep= 1.5em, column sep= 1.5em, column sep= 6.25em}} \tikzset{...

11

Basic explanation of meaning some commands/macros used in my answer I already add to the answer, so here I more or less repeat them. In graph are used predefined shapes of nodes. For its definition is used `\tikzset{ ...}, but they also can be defined locally as \begin{tikzpicture}[ presets of used graph elements ] < ...

5

Draw the grid but clipped with a convenient path. \documentclass[tikz,border=2mm]{standalone} \begin{document} \begin{tikzpicture} \clip[draw] (0,-3cm) -- (3,0) -- (0,3)--(-3,0)--cycle; \draw[step=.5, red, thin] (-3cm,-3cm) grid (3cm,3cm); \end{tikzpicture} \end{document} **Update: ** From Kevin comments I understand that he wants to draw a non ...

4

if you looking for something like this than the following MWE can be of help: \documentclass[tikz,border=3mm]{standalone} \newcommand\ppbb{path picture bounding box} \tikzset{% mynode/.style = {rectangle, path picture={% \draw[thick,red] (\ppbb.south west) |- (\ppbb.north east); \draw[thick,blue] (\ppbb.south west) -| (\ppbb.north ...

Top 50 recent answers are included