Questions tagged [tikz-styles]

{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}.

Filter by
Sorted by
Tagged with
185
votes
2answers
74k views

Should \tikzset or \tikzstyle be used to define TikZ styles?

The PGF/TikZ manual states in section 12.4 Using Graphic Options, page 120 (v2.10), that TikZ styles can be set using: \tikzset{my style/.style={<tikz options>},...} However, in several places ...
5
votes
1answer
245 views

Tikz equivalent of PSTricks commands ncbar and rnode

Motivated by this recent question, I tried to cook up a tikz based solution using the code provided in the answer to this question. More precisely, I tried to cook up equivalents of the pstricks \...
9
votes
1answer
3k views

Extract x, y coordinate of an arbitrary point on curve in TikZ

We have very nice Extract x, y coordinate of an arbitrary point in TikZ \documentclass{article} %\url{https://tex.stackexchange.com/q/33703/86} \usepackage{tikz} \usetikzlibrary{decorations.markings}...
27
votes
1answer
8k views

TikZ picture shapes

I am very new to the TikZ package, and I need to draw some flow chars by using the following shapes. However I couldn't figure out how to draw the 4th and and 6th ones below. It would be very nice (...
9
votes
1answer
1k views

Is there something like \providetikzstyle similar to \providecommand?

I have standalone figures that I include in my document. These figures use statements like \providecommand{\HypotenuseLabel}{$h$} which allows the figure to have a default label, and which can be over ...
15
votes
1answer
2k views

Draw additional parallel paths in TikZ

How can parallel lines elegantly be added to an existing path? I am looking for a solution or hint to, how a general style can be made, that works with any path. Example path: \documentclass{article}...
16
votes
1answer
4k views

Dependent node size in TikZ

I'm producing some control theory flow sheets in TikZ where I have specified the node box size. Since I'm making a lot of these flow sheets, I have set global styles for them, for instance the box ...
75
votes
1answer
59k views

How to set default style for arrow tips in TikZ?

I am creating multiple TikZ pictures within one document and would like to set the default style of arrow heads for all the pictures to the latex style, i.e. like -latex does, so that I don't have to ...
30
votes
1answer
8k views

How to create a ball shading and to customize 3D lighting manually?

TikZ shading=ball creates a perfect 3D ball perspective, but it has no option to change the lighting angle, the contrast, radius of light, etc (or I am not aware of). I tried to create a 3D ball by ...
15
votes
4answers
5k views

How to plot a graph from its adjacency matrix and coordinates of vertices?

A similar question is here. If we give all the data of the vertices's coordinates and the graph's adjacency matrix, how to plot it with tikz, pstrick or other tool in tex? here are the data of ...
9
votes
1answer
867 views

Is it possible to reuse tcolorbox definitions in another tcolorbox definition?

TiKZ allows to define a .style which can be later be used in another one: \tikzset{ first/.style={rectangle, draw}, second/.style={first, inner sep=2mm} } any change in first is ...
5
votes
3answers
1k views

Looking for symbol: Fire

I am looking for a "Fire" symbol: Like this, or more minimalistic: I found this code for a Shield, and thought that maybe you could make a Fire symbol that way? \documentclass{article} \...
8
votes
1answer
3k views

Tikz: adjusting pin anchor

I was looking for a possibility to adjust the anchor of the text of a pin. Tikz does not allow this out of the box. This question was already asked on the mailing list pgf-users@lists.sourceforge....
4
votes
2answers
750 views

tikz chronology year quarter timeline

Can tikz chronology.sty be used to create a timeline such as year-quarter. That is with 0.25 intervals between the integer years. For example, 2002 2002.25, 2002.5, 2002.75, 2003,... (or 2002Q1, ...
24
votes
1answer
9k views

tikzpicture in node of another tikzpicture: how to screen of from inheriting style?

I wish to create tikzpicture environments inside a node of another tikzpicture. The problem I encouter is that styles are inherited by the inner tikzpicture. How can I screen of the inner tikzpicture ...
15
votes
1answer
495 views

Embed a graph on a Sphere with TikZ?

I want to draw a graph on a sphere using TikZ. Something like this (please excuse my crude drawing): Is there a way this can be done automatically? I'm sure there's a way to perform a change of ...
4
votes
1answer
173 views

Tikzpicture blur show up incorrectly

In the code given below, the tikzpicture blur show up with an incomplete shadow: Is there a way to show the shadow just like in the first box where the shadow encompasses the entire box like this: ...
29
votes
2answers
4k views

Arguments for TikZ style

Motivation To put arrows inside of a TikZ path I have defined myself a TikZ style arrow inside. To make it even more portable I want it to take arguments like this \draw[arrow inside={pos = 0.1, end ...
29
votes
2answers
27k views

Change style of labels of Tikz nodes of a given style

How can all labels of a given type of node be restyled in Tikz? Imagine that there are nodes of different styles, and that only the nodes of style X should have red labels. Is this possible without ...
10
votes
1answer
5k views

Overlay LaTeX/TeX coding easily on PDF with 300 pages

I've been looking for a way to overlay TeX/LaTeX i.e maths language etc (everything LaTeX is designed for) onto a background document containing 310 pages combined together in a PDF file. So far I ...
13
votes
3answers
2k views

DIN conform arrowheads and hatching in TikZ?

I'm curious how the following simple figure can be recreated with all its characteristics, i.e the DIN correct arrow tips and the hatched areas. I'm very aware of various packages for tikz, where you ...
17
votes
4answers
2k views

How to plot blurred curves with PGFPlots?

I'm trying to replicate the following plot with PGFPlots: In this answer, the author plays with opacity when drawing overlapping ellipses. Is it possible to use similar code with arbitrary curves? ...
5
votes
3answers
5k views

Drawing a figure with concentric circles with text and shading

I am trying to draw the below given figure. Please help me to plot it in Tikz. I am only able to plot concentric circles. . I would like to have different colors in between different circles. Also, ...
20
votes
2answers
9k views

How to decrease the size of single node in mindmap?

In tikz's mindmap, I want to change the concept size for individual parents or children (not the entire system). It is simply possible to increase the size of a child node, by introducing minimum size ...
12
votes
1answer
2k views

How to shade mindmap concepts?

I tried to add a shade on my mindmap's concepts with \begin{tikzpicture}[mindmap, text=white, every concept/.append style={circle,shading=ball, ball color=black!20!white!20}] but the problem is ...
4
votes
2answers
1k views

Problems with flow chart - decision tree

I am creating a decision tree with flow chart in the using the tikz-package. A MWE is as follow: \documentclass{article} \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} ...
11
votes
2answers
998 views

Tikz style conflicting with clip command

Below is my example. I'd like to use a global style for all my tikz pictures to set up the line width. It is working well until I use a clip. I guess that it is not possible to pass some style option ...
9
votes
2answers
453 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 ...
7
votes
5answers
276 views

TikZ foreach “experience bar”

I'm trying to get TikZ to make a sort of experience bar command where I can just call it and enter a number out of say, 6, and it will return that many "filled" dots, and 6 minus that many "unfilled" ...
41
votes
1answer
6k views

Creating thicker Tikz mindmap connectors

I'm running MiKTeX 2.9, on a Windows 7 machine. My pdflatex compilation log lists: pgf 2008/01/15 v2.10 (rcs-revision 1.12) I am using TikZ's mindmap library to draw some graphics and I quite like ...
36
votes
2answers
3k views

Playing around with a Rubik's Cube in TikZ

My questions are: Is there a possibility to get a view of a Rubik's Cube in TikZ such as in pgfplots; like view={NUMBER1}{NUMBER2}? How can be the Rubik's Cube be scrambled with a number a, such that ...
26
votes
2answers
4k views

TikZ -The pretty boxes to frame the theorems-lemma-proposition-etc

I came across a website which provides examples of pretty boxes to frame theorems in LaTeX with extension bioboite and not with TikZ. Here is code with: \documentclass{article} \usepackage[T1]{...
20
votes
1answer
2k views

How can I draw arrows within a listing to explain positional association?

I need nice drawing in lstlisting C/C++ code. I'm trying to make something like this This is what i have made so far \documentclass[11pt]{article} \usepackage{listingsutf8} \usepackage{tikz} \...
12
votes
2answers
8k views

Inserting text inside an arrow in Tikz

I want to draw an arrow between two nodes (a) and (b), and write text inside the arrow. How can I modify this command to control the size of the arrow head and insert the text? \draw[->, >=...
3
votes
1answer
1k views

Annotate the table row highlighted by Tikzmark in Beamer

Here is my situation: I am using \tikzmarkin to highlight relevant rows of a results table in my Beamer slide deck. I want to put annotations to the right of the row highlight, so that hypothesis ...
11
votes
1answer
980 views

How to plot this cascaded/waterfall python-type plot using TikZ

I would like to make a plot of this equation P_n = \frac{n^a}{a!}\exp[-n] for different n. How can I use this cascaded style from the TikZ/PGF examples, to plot P_n (y-axis) with a (x-axis), for ...
10
votes
3answers
1k views

How to draw multiple lines inside the circle

I wish to draw the picture like below, however, I don't know how to add multiple lines in side the circle. This is my code: \documentclass[tikz]{standalone} \usetikzlibrary{ shapes.geometric, ...
8
votes
1answer
526 views

Create a coordinate node at each point of a path

How can I create a TikZ/pgf-style that will put a coordinate, which should be named automatically, at each point of a path? So the following code \draw[put coordinates](0,0)--(3,2)--(4,7)--(-2,1); ...
18
votes
2answers
2k views

Triple lines in TikZ

I need to be able to draw tripled paths in TikZ. I guess this could be done by some clever style which draws a big doubled path to get the outer curves correct, then uses some clever post-action ...
10
votes
6answers
994 views

How can “execute at begin node” be used with special characters like curly braces? (or: how to raise node content)

I'd like to define the following style: test/.style={ execute at begin node={\raisebox\{-0.2cm\}\{}, execute at end node={\}} } and use it like \documentclass{article} \usepackage{tikz} \...
7
votes
2answers
2k views

Tikz Nodes Positions and Shapes with a General Number of Nodes

My purpose is rather simple: use tikzpictures to draw tables of numbers, where the numbers are drawn inside colored boxes with fancy shapes, with different shapes and colors for different numbers. ...
4
votes
1answer
350 views

Unwanted faint lines connecting dashed double line

Building on the answer http://tex.stackexchange.com/a/304044/103076 by wrtlprnft, I have the following code \documentclass[tikz,margin=1cm]{standalone} \usetikzlibrary{decorations.markings} \...
9
votes
2answers
733 views

How to have a specific style for empty cells in a tikz matrix

I have a tikz matrix as the one in the code below which contains some empty cells. (Don't care about issues with column and row separations. I left that out for the sake of simplicity.) \...
8
votes
1answer
6k views

Display Database Instance Relationship with TikZ

I'm trying to display all of my corporate database instances and their relationship to each other, so to speak the database links. I found the geometry shape cylinder using TikZ \usetikzlibrary{shapes....
2
votes
1answer
256 views

is possible to define shortcut in `\tikzset`?

i like to define \tikzset for bunch of images, in which i define building blocks for control schemes. in defining those block i extensively use path picture where for anchors i use path picture ...
2
votes
2answers
2k views

Representing general transformations on a 3D grid using TikZ

I have a cuboid made from unit squares which in 2D looks like the following: Considering a 3D version of this (i.e. a cuboid). I wanted to use Tikz to demonstrate some of the possible deformations ...
2
votes
1answer
693 views

How make framed blocks in beamer [duplicate]

I want to create a block in every frame like this Because I don't like to use classical blocks like this Could you please give me the necessary code ? Thank you
7
votes
1answer
801 views

Beamer annotated tables

I am trying to include some boxes around numbers in a table. I am using the method exactly described on the answer to question below: Beamer, annotated tables using Tikzmark The issue is that the ...
5
votes
2answers
322 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 ...
3
votes
1answer
197 views

How to plot cascaded/waterfall barchart using TikZ

I would like to make a plot of this equation P_n = \frac{n^a}{a!}\exp[-n] for different n. How can I use this cascaded style from the TikZ/PGF examples, to plot P_n (y-axis) with a (x-axis), for ...