Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [tikz-pgf]

TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

2
votes
0answers
15 views

Macros running within cells of tikzcd, but to be (partially) executed later

The \arrow functionality in tikz-cd is placed in a given cell, and uses the position of that cell, although execution of the code itself (if I'm understanding correctly) is deferred until after the ...
0
votes
0answers
37 views

How to draw intersect of line sphere?

How to draw intersect of line sphere?
1
vote
0answers
19 views

Conditionals at the top of a tikz subgraph?

I want to use a conditional in graph with Tikz (awesome package by the way). My solution is to repeat the node with 2 different labels : "Urgent ?" -> ["yes"] "do something"; "Urgent ?" ->["no"]...
3
votes
0answers
31 views

Remove whitespace between baseline and symbol

Despite my naive anchor=center specification, these four symbols are not aligned by their center: \documentclass{standalone} \usepackage{tikz} \tikzset{x=1pt, y=1pt, z=1pt} \begin{document} \...
0
votes
0answers
40 views

tikz does not compile the personal definition of a pic

I am running WinEdt 8.1 on my Windows 8 computer, using Tikz 3.0. When I compile the following file, I receive an error message (I will show an example below the file). However, 1) I can see no error ...
5
votes
3answers
182 views

Rotating Standard Graphs

Is there are way to rotate standard graphs in tikz? For example, the following produces a cyclic graph with 6 vertices \begin{tikzpicture}[every node/.style={fill,circle,very thick,inner sep=0pt}] ...
1
vote
1answer
37 views

Inserting counter in beamer class

I want to create my own beamer theme and I've got the rough code for it. \documentclass[serif]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{...
1
vote
1answer
68 views

How to create a shade effect in TikZ

I want to create my own beamer theme and I've got the rough code for it. \documentclass[serif]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{...
2
votes
1answer
41 views

Make tikzpicture include tables that extend beyond bounds

I have a tikzpicture within a tabular cell as shown: Here's the code: \documentclass{article} \usepackage[textwidth=21.5cm,textheight=26.50cm]{geometry} \usepackage{tikz} \usepackage{tabularx} \...
8
votes
1answer
507 views

Is my current workflow worth using or idiotic?

I am currently writting my thesis and use several graphics which I make using tikz. For now on my workflow/document looks as the following: In the latex project folder I have a seperate folder where ...
0
votes
0answers
22 views

Genealogytree: how to add child subgraph in parent subgraph?

In order to build a complex genealogy tree, I would like to add a child subgraph to a parent subgraph. How can I add a child and a grand-child to "H"? \documentclass{article} \usepackage[all]{...
4
votes
3answers
73 views

Graph axis label rotation

I thought ylabel style={rotate=-90} would prevent my y-axis rotation but it is still happening for some reason. It seems that the grid lines are still going through the tick labels even after I put ...
1
vote
1answer
70 views

Creating own beamer theme

I want to create my own beamer theme and I've got the rough code for it. \documentclass[serif]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} \usepackage{...
1
vote
0answers
45 views

How to code this tricky hierarchy tree?

I have a problem which that I have no idea of how to draw this diagram in Tikz I wanted it to look like this other hierarchy diagram, but that was drawn completely using Tikz. I tried using Tikz and ...
0
votes
4answers
98 views

drawing relationships between mathematical sets in latex

I have the sets products (p), subgroups (S), groups (G) and categories (C). Each product belongs to a subgroup. Each subgroup belongs to a group. Each group belongs to a category. The image below ...
5
votes
2answers
45 views

Optional Arguments for Macros Called within Tikz Matrix

I am trying to set up a tikz matrix (actually, in this case, a tikz-cd) where I call different macros within the cells, which will determine the content that appears. This all works fine provided I ...
7
votes
1answer
124 views

Include accolade in bipartite graph to group nodes together

I want to include accolades in my bipartite graph to show that nodes belong to a certain group. With the code below I created the following bipartite graph: \begin{figure}[H] \centering \definecolor{...
1
vote
1answer
40 views

insert code listings in the scope of \foreach

In the following code \documentclass[a4paper]{article} \usepackage{listings} \usepackage{tikz} \begin{document} \foreach\a in {x, y}{ \begin{verbatim} ...
4
votes
0answers
49 views

Visibility of path names declared in \foreach loops

Buildup Basic setting Using the intersection library, I encountered some behaviour of path names that I do not understand. The following works in the intended way: \documentclass{scrartcl} \...
0
votes
1answer
56 views

How to draw simple graphs, paths, arrows [on hold]

I´m trying to learn how to draw with LaTeX, but I have found too much info about that: 1. XY-Pic 2. pgfplot 3. tikz 4. LaTeXDraw 5. PSTricks So I need to focus in one package/tool each time to ...
5
votes
1answer
82 views

Curved line with varying style

Following this question, I was wondering if it is possible to draw (with a single \draw call) a curved line that is partially of one style then of another etc ... A solution proposed in the linked ...
0
votes
1answer
49 views

LaTeX code for boxes used in smartdiagram package

I want to draw boxes with same color code and font like those used in the smartdiagram package. Can someone help provide some hint in doing this. See the diagram.
6
votes
1answer
200 views

How to hide lines behind the surface?

I'm trying to draw some smooth looking surfaces with gridlines, and I'd like the grid lines to be invisible (or transparent or whatever) when they are obscured by my surface. In my code below, you'll ...
3
votes
2answers
77 views

How set TikZ circle radius in \node[circle]?

I know that with TikZ, we can specify the radius of a circle when a \draw command is used, as in: \draw[fill] (1,2) circle (3pt); But how does one indicate the radius when you draw the circle by ...
2
votes
1answer
45 views

Split the page into different sections

I am new to TikZ package. I am trying to split some LaTeX pages to different sections. In each section I want to be able write a text and draw simple Tikz figures(such as lines\draw (0,0) -- (4,0);) ...
5
votes
2answers
41 views

How to sketch a simple horizontal box plot

I am trying to plot a box plot in latex. Below is what I want (only horizontal axis; ticks or axis arrows are options but I do not want axes borders or any vertical axis element). The code below is ...
7
votes
2answers
101 views

“every path” style affects \node “path” when decorating

Here's a MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{tikzpicture} \draw[decorate, decoration=random steps] (0,0) -- (10,0); ...
7
votes
2answers
116 views

Can't get new line at tikz diagram text

Look at this: \begin{tikzpicture} \path (0,1) node[draw,rectangle,rounded corners,fill=green!80]{$P$} (0,-1) node[draw,rectangle,rounded corners,fill=green!80]{$Q$} (2,0) node[draw,rectangle,...
4
votes
2answers
99 views

tikz : Arrow heads does not scale with the rest of the picture

I'm trying to include a scaled graph into another picture (yes I need to use nested tikz pictures, but I can't find any better way), and the problem is that the arrow heads are not scaled properly, so ...
5
votes
2answers
97 views

TikZ: redefine/update node label

I need to draw many nodes with labels that I can calculate from their indices. However, a small amount of them do not follow the rule, thus I need to assign their labels manually. Can I do that ...
0
votes
0answers
36 views

Drawing from a node in 2 different directions with duplicate node names

I wanted to draw from a point to x and y axes using only one coordinate definition. From the very appreciated answers to this question and this question, I used the following code to achieve my goal. ...
4
votes
1answer
78 views

tikz align nodes

is it possible with TikZ to align a new node with respect to existing ones? I know the answer is affirmative in the case of one node using e.g. the node coordinate system, but what about align with ...
16
votes
3answers
560 views

Beamer Highlighting some part of an image and hiding remaining part

I want to highlight some part of an image and hiding the remaining part. My minimum working example is below. Any help will be highly appreciated. Thanks \documentclass{beamer} \usepackage[T1]{...
0
votes
1answer
40 views

Unable to use pgfshade inside bookcover

I'm using the excellent \shadowimage by Gonzalo Medina to create an image with a drop shadow. In addition, I'm using the bookcover package to create a book cover: \documentclass{bookcover} \input{...
12
votes
3answers
930 views

Drawing enzyme with TikZ

It is possible to draw something like the figure below using TikZ or any other Latex package?
6
votes
2answers
165 views

Tikz: shifting coordinate after arc (and radial color gradient)

Basically, I wanted to create an illustration similar to the bottom rod of this plot: Following the answers here and here, below is the code for my best attempts. There are two issues: In both ...
0
votes
0answers
30 views

pgf/tikz externalization + tabu: makefile and legend to name problems

I am having troubles with the combination of tabu and pgf/tikz exernalization. Please consider the code snippet below which I try to compile using lualatex or pdflatex using texlive 2018. \...
5
votes
2answers
506 views

3 DOF Bicycle Model in Latex

A common way of modeling a vehicle's dynamics is to use a 3DOF bicycle model I tried to create this in tikzpictures, but I am having some difficulty. I was going to just give up and do it in ...
4
votes
1answer
137 views

Problem of using Tikz in beamer presentation

I used Tikz to draw some specific shapes on a matrix, this the MWE that I am using: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix,decorations.pathreplacing} \pgfkeys{tikz/...
2
votes
3answers
83 views

Drawing from a node in 2 different directions using inline node

In this question, I supplied a code to take an external node as a reference and I`ve got satisfying answers. Using these answers to draw from an inline node I used the following code: \begin{...
3
votes
1answer
42 views

Drawing over parts of a node with rounded corners

On the left I have created two nodes (Zero Node in blue and One Node in gray) and would like to draw over the existing path from A-B-C-D (including the notches). On the right is my attempt drawn in ...
7
votes
2answers
138 views

Fill area between two parabolas using tikzpicture environment

I was asked to find the integral between x = -4 and x = 4 of the intersection of y_1 = x^2 and y_2 = -x^2. So I recreated it using LaTeX. Please consider the following MWE: \documentclass{article} \...
0
votes
1answer
36 views

Alignment of width of tikz nodes/containers

How to level the width of all the blue dashed containers w.r.t the container with maximum width (container with label 'Outer box 1' in the figure attached). Also wants to apply the same to container ...
2
votes
1answer
47 views

Drawing a transformer with multiple windings with circuitikz

I'm trying to draw a transformer with multiple windings with circuitikz similar to the figure shown here (except I'd like to have multiple primary windings and a single secondary winding): (Source: ...
4
votes
2answers
70 views

Add arrow and words on a magnified pic using TikZ spy

I want to add some arrows and words on a magnifying pic. Add A, B, and C on the magnifying pic. Could anybody help me fix this problem? Thanks \begin{figure} \begin{tikzpicture}[scale=1,spy ...
2
votes
2answers
61 views

Drawing from a node in 2 different directions

I use the following code to draw from node (x2), which is located at (4,3), in one direction, return to it and then draw in another direction. Is there a way to avoid returning to the node, for ...
11
votes
1answer
181 views

Drawing some specific shapes on a matrix using Tikz

I am new to using Tikz and, I have a matrix which is the sum of three matrices L, D, U. To illustrate these parts, I would like to generate the following image using Tikz: How can I do that, any help ...
2
votes
1answer
45 views

Plot 3D figure in Latex as in Matlab

I would like to plot 3D figure in Latex using Tikz as in Matlab, The problem is settings of an axis. In Matlab I have In Tikz \begin{figure}[!ht] \centering \begin{tikzpicture} \...
2
votes
1answer
24 views

raster plot with tikz in latex from csv file

I am trying to plot neuron's spikes which are stored in a csv file the following way: time, neuron1, neuron2, neuron3,... 1,1,0,1,... 2,1,0,0,... 3,0,0,1,... and so on... Therefore the data ...
10
votes
1answer
233 views

How to make a thermodynamics conduction diagram in pstricks or tikz with shading?

I am attempting to make the following picture But I would like some elements modified which I have done in the following pstricks image. I do not know how to center text, do multiline text for "...