Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

0
votes
1answer
15 views

How to set a value of a key of a user-defined (not global or default) style through /utils/exec (or similar means that allow for code execution)?

I need to change the value of the color key of changeStyleColor style through that style's /utils/exec. I can set a value of a global key through /utils/exec by \tikzset{/tikz/myKey=myValue}, or can ...
2
votes
1answer
36 views

How to draw a kraft paper bag with a zigzag side? [duplicate]

I need to draw a rectangle with a zigzag side as a kraft paper bag. How can I fill it properly with the color? \documentclass{article} \usepackage{tikz} \usepackage{xcolor} \usetikzlibrary{...
3
votes
1answer
69 views

How to use \ExplSyntaxOn and \ExplSyntaxOff inside tikzset?

If you place ExplSyntax on/off inside tikzset, code (that is expected to work) within ExplSyntax would generate errors. But if you bring ExplSyntax outside of tikzset (enclosing the tikzset), it makes ...
3
votes
1answer
38 views

How to plot a dashed line for some data predictions followed from a solid line from historical data

Problem I have a set of data from a .dat file, which every value could be "historical" or "prediction". year emision data_type 2008 9.24309 hist 2010 8.50724 hist 2012 8.06490 ...
3
votes
1answer
32 views

tcolorbox styles deriving from each other [duplicate]

The listing package allow to easily define styles and environment that derives from each other, which is very practical to avoid to copy and paste a lot of code. I am trying to see how to do the same ...
2
votes
2answers
48 views

Aligning 2 Minipages to the top of a figure and scaling nodes

Below is my MWE and an example how it should look like. I asked a kind of similar question yesterday, see here. Now the problem is, I need both graphs to be vertically the same height, so equally ...
3
votes
1answer
168 views

Complicated arrows in flowcharts

I have done most of the flowchart except for some complicated arrows. The code that I am using is \tikzstyle{io} = [rectangle, rounded corners, minimum width = 3cm, minimum height = 1cm, text ...
1
vote
1answer
19 views

Error when refactoring Tikz, scope argument gives error when given via a command

When I do \begin{scope}[every node/.style={minimum size=1cm,draw,rectangle}] \node (v1) at (2,0) {$\#1 \cdot \#2$}; \end{scope} it works. But when I do \newcommand{\operatorNode}...
2
votes
3answers
200 views

Tikzpicture in figure problem

Below is my MWE. My only problem is, I need the tikzpicture to be pagewidth (textwidth) and not overflow to the right. I tried adjustbox, fbox and resizebox. \documentclass[ a4paper, % ...
0
votes
3answers
111 views

2d Grid with Tikz and Nodes

I'd like to create the following graph: But I can't figure it out. I'm pretty new to Tikz and nodes in general, so a simple solution is appreciated. Here is another grid but I can't figure out how ...
2
votes
1answer
42 views

Why assignment of path aliases and names through `every path` fails?

every node test-run: \documentclass[border=5mm,varwidth=100mm]{standalone} \usepackage{tikz} \newcounter{myCounter} % following properly creates aliases and names in "every NODE" \tikzset { ...
0
votes
0answers
46 views

How can I make the diagram similar to the attached in LaTeX? [duplicate]

I want to make a detailed timeline of life events in a similar fashion of the attached photo, can someone share code?
1
vote
1answer
29 views

Tikz style for rectangle with text in border

I'm trying to create a reusable style (let's call it titlerect) for a tikz node which is supposed to look something like the following figure I quickly whipped up in Inkscape: I imagine it should be ...
1
vote
1answer
60 views

Graphic of Richardson Number

I was inspired by the graphic Moon Synodic Period, created by Tangent Plane. I insert the code here. I tried to create scale definitions, so I could scale the graph and the text, but I'm not entirely ...
5
votes
3answers
654 views

I drew a randomly colored grid of points with tikz, how do I force it to remember the first grid from then on?

I'm using beamer and I have a randomly colored grid (three colors, 4 x 19 grid) on the slides. Since I use the \pause command, it generates a new grid every time I click to the next point. How do I ...
1
vote
3answers
29 views

How to bring points in a tikz grid closer together/remove the space between points in grid in tikz?

So I have a grid of 4x19 points/small circles, which need to be individually colored later. It has to fit into a beamer presentation sheet, so the points have to be brought closer together. This is ...
3
votes
2answers
88 views

Formatiing text inside tikz node

I am trying to align text inside the tikz node like in picture below. I tried to use tabular environment, but I wasn't successful. Is there a way to align text like that? Code I wrote so far: \...
1
vote
1answer
17 views

Connecting two nodes from the same mother node horizontally

I am trying to create a diagram where one node connects to two nodes horizontally. I have attached the image of the diagram I want. However, I am having trouble moving the d node upward so that the ...
0
votes
1answer
29 views

Adding circle to tikz graph with arrows

In continue to the great answer provided in: Changing a tikz figure to have more blocks I'd like to modify this figure and add an "adder" node with arrow and text, and also add a text near the ...
2
votes
1answer
54 views

Plot a graph above a curve with vertical lines as pattern

I want to plot the graph of a function (say a sine) on a curve, that is to say, plot the graph above a straight line then distort it into a given curve. Here's a minimal example : \documentclass[...
5
votes
2answers
109 views

TIKZ - changing one block into parallel multiple blocks

I have the following code: \documentclass[crop,tikz]{standalone} \usepackage{tikz} \usepackage{textcomp} \usetikzlibrary{shapes,arrows} \usetikzlibrary{positioning} \usetikzlibrary{arrows, ...
0
votes
1answer
49 views

Drawing a top in tikz

I want to draw a top to show the Gyroscopic Effect in my techinical reports,just like the figure : the top can be simplified like a circular cone ...... Could any body give some tips for me ?Thx for ...
8
votes
2answers
378 views

Alignment of various blocks in tikz

As you can see the left side of the 3 lower blocks are moved to the right while keeping their right sides aligned with the right side of the first block. I'm using the following code: \documentclass[...
4
votes
1answer
61 views

rearrange tikz dashed rectangle blocks

I have the following tikz code: \documentclass[crop,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \usetikzlibrary{positioning} \usetikzlibrary{arrows, chains, ...
4
votes
2answers
124 views

draw dynamic circle around node and edges

How do I add the red circle as shown in below image but with dashed line circle. I want it to follow the path structure. So far, this is my code: \begin{forest} [$root : s_0$ [$a: s_*$ [$d: s_*$] [$...
3
votes
1answer
146 views

Project this triangle on surface of a sphere

I have the following triangle in TikZ MWE: \documentclass[tikz]{standalone} \usepackage{pgfplots,mathtools} \usetikzlibrary{hapes,decorations.pathreplacing} \usetikzlibrary{patterns} \definecolor{...
5
votes
4answers
1k views

How to draw this diagram using TikZ package?

Please can someone show me how to draw the diagram (photo) using TikZ package. I just arrived to the following diagram by using the following code \documentclass[smallextended]{svjour3} % ...
0
votes
2answers
49 views

How to draw arrows on each arc and line in \path?

When I draw paths: \path [draw=blue] (0,0) arc(-60:60:1.732) arc(120:240:1.732); I want to add an arrow in the middle of each arc within this \path. Like this: I have tried the "show path ...
3
votes
1answer
52 views

Hatch direction

I want to modify the hatch lines direction marked in red of the next diagram: It was obtained with the next code: \documentclass[letterpaper,11pt]{report} \usepackage[utf8]{inputenc} \usepackage{...
-1
votes
1answer
97 views

Save tikz image and use away from latex

I need to create and save latex drawing so i can use there else where. Im using the code \begin{tikzpicture}[scale=0.8,domain=-2:20] \begin{axis}[ height = 11.7cm, width = 15cm, axis lines=middle,...
2
votes
1answer
43 views

Fill area under curve using colourmap and Tikz

I'd like to use a colourmap like hot2 in this plot, where red occurs at x=0, and green occurs at x=1, but I can't find any way of doing it. Here's what I have so far: \begin{tikzpicture} ...
3
votes
1answer
245 views

Problem with fill color

I use the following command to create regular polygons. The 5th argument is there to insert options for styling the polygons. Though the line width is 0.3mm as I set it, it looks like the fill=red ...
0
votes
1answer
41 views

multiple edges reach to a node without any bending

I am trying to use tikz library to generate graphs where some nodes have multiple input edges and I would like they would be separated when they hit the node but I have failed so far. This is an ...
4
votes
1answer
57 views

adding edge label to tikz and bayesnet library

I want to generate similar graph as follows using bayesnet library but I do not know how I can add labels for edges This is my code so far \documentclass{article} \usepackage{amsmath} \usepackage{...
7
votes
2answers
842 views

Is there an wasy way to program in Tikz something like the one in the image?

I am able of doing the hexagons and the rectangle, as well as all the nodes and so on. My problem is if there is an easy way to draw the blue arrows of the image, knowing that I have given to ...
0
votes
0answers
66 views

Why are my characters overlapping?

As a test of what's going wrong with a longer LaTeX file I've written, here is what I tried: \documentclass{article} \usepackage{tikz} \pagestyle{empty} \begin{document} \begin{tikzpicture} \draw (0,...
0
votes
0answers
47 views

Is there a tikz command for showing people in a flowchart?

I need to show a group of people (sometimes women, sometimes men) in my flowchart. Is there any command for that?
3
votes
1answer
48 views

Two side by side flowchart (tikz-flowchart) with box and label for each

I need to draw two flowchart using TikZ with a box around each flowchart and a label. I'm new to Tikz library and I have looked similar questions regarding pictures and tables and figures. They ...
1
vote
1answer
54 views

Tikz/pgfplots Reduce distance between Tick labels line break

I'm pretty desperate with a problem I have right now. I'm trying to create a lollipop plot that has different categories on the y-axis and occurrences on the x-axis. According to the below code. Note ...
5
votes
1answer
53 views

How to make (multi part) node fill color depend on its content?

In the following MWE i like to change fill and text color depending on content of a cell similarly as I manage to change text color for this particular cell content: \documentclass[tikz, margin=3mm]{...
4
votes
2answers
254 views

A collection of the actual smartphones

Considering the recent excellent questions that I've really enjoyed Welcoming 2019 Pi day: How to draw the letter π? and What has been your most complicated TikZ drawing? I have carefully observed ...
4
votes
1answer
262 views

how to write weight parallel to edge?

In the following graph edge weight by default is written as horizontally, I want to write weight value parallel to edge between two nodes. How may I write weight value parallel to the edge between ...
4
votes
1answer
29 views

How to bend text so that it follows the curves of a Venn diagram

I need to make "class A", "class B", "class C" follow the curves of the circles immediately containing them: \documentclass{article} \usepackage[english]{babel} \usepackage[utf8]{inputenc} \...
0
votes
0answers
37 views

Latex Figure Query

I am trying to draw a figure in Latex and then convert that pdf to jpg and import in Powerpoint slide. I do not want "Figure 1" which comes below the figure as every separate figure gives me "Figure 1"...
0
votes
0answers
125 views

Wrapfigure unrecognized environment

TeXstudio has highlighted this for some time. same problem indicates it in the commands: \tikzmarknode{}, \eqdescbox, \dimexpr I have no problems in compiling the pdf file, I only see these things ...
2
votes
1answer
94 views

Setting Styles in tikzset

I am facing several issues when trying to create a picture as a tikzset and load it with different variables. The tikzset includes styles for: parts of the tikz picture (in the example the nodes)...
0
votes
1answer
56 views

Filetree with pagebreak works but just with one Filetree

I found a latex code (file tree with page break, the owner/creator of this code (pagebreak+filetree) is Sašo Živanović). I want to use this code for a documentation. I want to have several different ...
2
votes
1answer
51 views

TikZ: Define a style of node that puts halo/contour around text [duplicate]

How put halo around text using the contour package as suggested in this answer in many nodes by defining a style? MWE: \documentclass[tikz]{standalone} \usepackage[outline]{contour} %halo around ...
1
vote
1answer
42 views

How to edit this figure to be drawn in just a column of 2 column paper?

The code below makes the output figure to be in full page width. I need to have the same output figure with the width of column (width of 3.9 in). I tried to use this command for the figure ...
-3
votes
1answer
94 views

Hi there! I'm looking for a help drawing this diagram. Any ideas? [closed]

ttps://i.stack.imgur.com/RJiXH.png