{tikz-styles} are predefined sets of options that organize how graphics elements are drawn. It is thus possible to program specific styles and reuse the styles on different objects. The {tikz-styles} tag can be used in parallel with {tikz-pgf}.

learn more… | top users | synonyms

1
vote
0answers
37 views

TikZ align nodes with different heights

iam trying to make a treeview with tikz of the different hazards modes that exist with lithium-ion batteries. now i have the problem that some nodes have a text with two lines and then it doesn't look ...
4
votes
3answers
113 views

Adjusting edge and vertex label

I am using the following code (thanks to several answers on TeX.Stackexchange) to draw a small bipartite graph: \documentclass{article} \usepackage{tkz-berge} \usetikzlibrary{fit,shapes,arrows} ...
2
votes
2answers
37 views

PGF-Plot not at centre

I would like to plot some circles with pgfplots inside a diagram, however, they are always off-centered. \pgfplotsset{width=7cm, compat=1.12} \pgfplotsset{compat=1.5.1} \begin{tikzpicture} ...
2
votes
0answers
28 views

How to stack the tizk tables in block?

\documentclass{beamer} \usepackage{adjustbox} % adjusting table (too wide) % Fancy tables \usepackage{tikz} \usetikzlibrary{trees,positioning} % tree \usetikzlibrary{matrix} % Table ...
3
votes
2answers
47 views

Expansion in forest

I am trying to expand a macro as part of a style within a forest tree. Here's an MWE: \documentclass[tikz,border=5pt]{standalone} \usepackage{forest,ifthen} \begin{document} \bracketset{action ...
4
votes
2answers
93 views

tkz-berge, renumbering vertices

This TikZ code for drawing an icosahedron and labeling gives only a partial answer to my question. With the following code \documentclass{article} \usepackage{tkz-berge} \begin{document} ...
3
votes
1answer
42 views

Can we define a node's inner sep value with relative units in terms of the in-scope font key value?

Very often I find myself defining styles for various drawing annotations. This is great for structuring figures. There is, however, a minor thing I hope I can improve. This stems from the fact that ...
2
votes
2answers
96 views

How to center text in a ellipse and to draw circle nodes?

I have spend much time on this figure too and I have tried different types of tikz, pstricks and multido use packages. I would like to create a figure, which look like this: I have wrote following: ...
1
vote
0answers
93 views

Möbius transform Tikz - special request

I would need some picture in Tikz but I don't know how could I achieve them. ( I don't know if exsist some code of it). There is a youtube video which shows the Möbius transforms in two dimension ...
1
vote
1answer
45 views

Aligning edge labels horizontally with tikz package

I have the following figure: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage[active,float]{preview} \usetikzlibrary{calc} ...
3
votes
2answers
76 views

How to set distance between individual siblings in a tikz-qtree tree?

I have made this tree for my research project. I've just renamed all attributes for this question. You can see in the picture below that siblings on the top are very congested and the picture overall ...
1
vote
1answer
33 views

Replace axis line which has been set as a style before

I can't figure out how to override the axis line style from "with arrow" (set in a style) to "without arrow". Here is a MWE: \documentclass[]{scrartcl} \usepackage[utf8]{inputenc} ...
2
votes
0answers
29 views

Add a row and a column to tikz matrix with a different style [duplicate]

I should add a header row: 1 2 3 4 to a matrix and a column (as before: 1 2 3 4 ) on the left of the same matrix. But the style should be different like below: this is my MWE: ...
10
votes
1answer
140 views

TikZ decoration to draw a winding or twisting ribbon

I enjoy TikZ styles and decorations a lot, but I still dabble with them. I know how to draw ribbons with a style, if they aren't meant to twist. But I'd like to define a style that has a twist of the ...
3
votes
1answer
57 views

Adding manually a grid to a .tikz file generated by matlab2tikz

I asked this question here Stackoverflow Now, I know of the existence of the problem with the conversion with the matlab2tikz script and the inclusion of a grid. GridProb How can I manually add a ...
4
votes
1answer
25 views

How can I set a style in `\forestset` which requires delayed calculations with the results of node walks?

What is the correct way to wrap the specification for the tree below into the my binomial style defined in \forestset and why? The following code works fine: ...
2
votes
1answer
57 views

Labels close to pie chart figures

I am trying to crate two pie charts side by side using tikz. I've found a code in the web that I am adapting, and so far, it seems to work. However, instead of using a separate legend below, I would ...
1
vote
0answers
43 views

tikz label over path flips!

I'm trying to come up with a nice schematic of recursive calls using tikz, but the result is not what I expect as one label is flipped without a reason: The MWE is: ...
9
votes
3answers
211 views

Tikz Edge: Distance from other nodes?

I have the following Tikz code: \usetikzlibrary{positioning} \begin{tikzpicture} \tikzstyle{bordered} = [draw,thick,inner sep=5,minimum size=10,minimum width=100,font=\sffamily] ...
1
vote
1answer
48 views

Get x and y labels for tikzpicture

I have plotted a scatter diagram with pgfplots: With this code: \begin{figure}[H] \centering \begin{tikzpicture} \pgfplotsset{ticks=none} \begin{axis}[ymin=0, ymax=10.5, ...
2
votes
1answer
44 views

How to get line width and inner sep values?

I try to get the values of line widths and node inner sep. How to read such a value form own style (if it will be specified during modifications of the picture) or if it is not specified in this ...
4
votes
1answer
54 views

How to group 2 by 2 style this plot?

I have the following plot that say something about performance: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.12} \begin{document} \begin{tikzpicture} \begin{axis}[legend ...
5
votes
1answer
82 views

pgfplots - How to specify default line widths for plots and marker?

I would like to specify different default line widths for plots and for markers (like x-marker). For the plot line width, I use: \pgfplotsset{every axis plot/.append style={line width=1pt}} Yet, ...
6
votes
2answers
116 views

How does the angle key from arrows.meta TikZ library work?

The title says it all. How does angle=<angle>:<first dimen> <second dimen> works. More exactly, what do the first length and the second length mean? \usetikzlibrary{arrows.meta} ...
4
votes
1answer
83 views

Why does “fill opacity” affect nodes in the same path?

With the following code \documentclass[border=3mm,tikz]{standalone} \begin{document} \begin{tikzpicture} \draw[fill=brown] (0,0) rectangle ++(1,1) node[above right]{B}; \draw[fill=brown, fill ...
5
votes
1answer
97 views

How to draw inside a TikZ node using node style with arguments?

The question is an extension to this question, and is also related to this one. I want to draw a Simulink-style sum block which is basically a circle node with a port in each direction (north, west, ...
4
votes
2answers
34 views

Why are explicitly positioned nodes affected by 'on chain' as a default?

I want to place an X on a connection to show it is impossible. This is the MWE; the full example has a large number of chained nodes, hence the default, even though the MWE has no chained nodes. ...
3
votes
1answer
56 views

Tikzcd styles error

I'm trying to get to grips with using styles in tikz but I'm struggling to work out what is wrong with the following example. The problem is that both 'arrows' should appear simply as lines (like the ...
2
votes
1answer
56 views

Problems plotting histograms as a line graph?

I would like to plot some percentages as a line graph, so I tried this: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=2.12} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
102 views

Distance between arrows and nodes in tikzcd [closed]

How can I adjust the default distance between arrows and nodes in tikz-cd? I prefer a global solution, but a local solution would also be fine. I think the default distance is a little bit too large ...
3
votes
1answer
71 views

How to plot this histograms as a line graph?

Let's say I have this histogram plot: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ symbolic x coords={a small bar,a medium bar,a large bar}, ...
1
vote
1answer
35 views

tikz mdframed environment: lemma/excursus skips pages

I used the example code under this link [TikZ mdframed environment: close box at end of page and continue on next to successfully create a nice excursus section in an a4 onesided environment. However, ...
9
votes
2answers
172 views

Good way of ignoring \draw, \fill or \node

I know three ways how to "ignore", or at least "hide" something in TikZ using [...] or \tikzset{bla/.style={...}}: [draw=none] (works like charm for \draw, but doesn't work for node contents; ...
7
votes
3answers
275 views

drawing an orthonormal frame with semi circles

Hi, I have a problem in drawing this frame, and with colors, especially using tikz programs or the hobby the program don't compile with hobby. Can anyone help me in drawing this pic? thank you. i ...
3
votes
1answer
69 views

tikz, minipage and positioning problem

I am using tikz and minipage to create a note box inside a description list. The problem I am facing is that I practically do not have any control over the positioning of the minipage and the ...
6
votes
1answer
132 views

Reproducing picture as shown in the example

\documentclass[landscape,a5paper,11pt]{article} \usepackage[utf8x]{inputenc} % utf8 encoding \usepackage[T1]{fontenc} % use T1 fonts \usepackage{amsmath} % nice math symbols \usepackage{bm} % bold ...
6
votes
1answer
62 views

Why `fill` covers `append after command` elements?

Next code is just a little example to describe the problem. I would like to add some elements (lines or text) inside a node and I would like to do it through node's .style. I've tried with append ...
1
vote
1answer
39 views

Make axis longer in 3dplot

How can one adjust the length of the axes in a plot made with pgfplots/TikZ without affecting the plot itself?
1
vote
1answer
47 views

A line crossing root-node in tikzpicture

I am facing a little problem. I have a line crossing a root-node.. How to fix it ? \tikzset{ basic/.style = {draw, text width=1.5cm, drop shadow, font=\sffamily, rectangle}, ...
-1
votes
1answer
138 views

Fractals in TikZ [closed]

How to draw a shape like below using fractals in tikZ?
4
votes
2answers
84 views

Issue with nodes using tikzstyle

I am having some trouble forming a game tree. My third layer appears to want to connect to the labels of the layer above, rather than the end nodes. Here is an image and the following is what is ...
3
votes
1answer
81 views

Change style of PGFplots 3d box

When making a 3d axis plot by means of PGFplots, one can for instance change the style of the grid with \pgfplotsset{grid style={dashed,gray}} . But when using 3d ...
0
votes
0answers
31 views

I like to make diagrams to represent stochastic zero-sum games that depending on the actions chosen the state changes.

So for one state each player has two choices and for each action box, I want to have the payoff value on the left top corner and after a diagonal border on the right bottom corner put either the next ...
3
votes
2answers
159 views

How to make a rectangle of 3 colors with Tikzstyle and Tcolorbox

I've to write a book in arabic, with a background given by an image with stripes in 2 colours in the margin of the page. I include it in the document without any problem with the package bachground. ...
1
vote
1answer
164 views

Drawing figure of a boat with the Tikz-package

I want to draw a simple figure of a boat in LaTex, does anyone know a good way to do that? Is TikZ the best package to use for this? I want it to look similar to the boat in the picture below, which I ...
5
votes
0answers
61 views

Beamer's (implicit) options regarding tikzpictures and shadows

While trying to use the torn page effect in a beamer document, I was confronted to an unexpected problem. If you just take the the code of this answer and compile it, you get: If you just change ...
6
votes
2answers
227 views

Bend arrow decorations in Tikz

This is a follow-up to my recent question Half arrows in graph using TikZ. \documentclass[tikz]{standalone} \usetikzlibrary{matrix,arrows,arrows.meta,bending,decorations.pathreplacing, ...
2
votes
0answers
35 views

how to plot a linear function with TikZ? [duplicate]

I am plotting a simple linear function. The plot looks fine, but I want to extend the function up to x=7. Anyone knows, please how to do that? My code is the following: \usepackage{tikz} %for ...
4
votes
1answer
115 views

Error “Undefined control sequence” when using [remember picture, overlay]

I am using two tikzpicture inside another tikzpicture. I want to draw a arrow from one picture to the other. For that I used [remember picture, overlay] property as shown in the code below. New Code ...
2
votes
1answer
72 views

figure 2 for Crossed Ladders Problem

I'd like to draw triangle like the following: but using the following code which produces: The code must represent the structure of the triangle, like that: ...