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.

1
vote
0answers
54 views

Tikz color opacity spills over to page

for some reason, the use of the opacity option in my tikz diagram "spills over" to the rest of the page. Weirder still, this isn't visible from the preview window in texstudio, but it is when opened ...
2
votes
3answers
96 views

Text alignment in tikzpicture

I would like to have two lines of text with my time line below. How could I do this: MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} % draw horizontal line ...
0
votes
0answers
31 views

restrict text inside tcolorbox

I have defined a tcolorbox as: \tcbset{% outerlayer/.style={% enhanced, sharpish corners=all, colbacktitle=dcol, coltitle=white, coltext=dcol, ...
8
votes
2answers
709 views

Matrix with effects

Sending out the bat signal 🦇. Could you please help me to get this piece of art? I have no idea about how to obtain it. In the meantime I’m working on a MWE: documentclass[tikz,border=3....
0
votes
1answer
21 views

edgeworth box can't draw node

I would like to draw in a caption on the top, bottom, left and right of this graph. Unfortunately I can't seem to draw anything at all: MWE: \begin{document} \begin{tikzpicture} \begin{axis}[axis x ...
0
votes
1answer
23 views

Tikz markers shape

I want to know what's wrong when I change this code, which yields a red star, to a triangle shape: This one works: \pgfdeclareplotmark{mystar}{ \node[star,star point ratio=2.25,minimum size=6pt, ...
1
vote
1answer
24 views

Changing markers shape in tikz

Hi I would like to know how can I get the following markers that appear on the attached picture: This is a mwe with the coordinates: \documentclass{standalone} \usepackage{subcaption} \usepackage{...
4
votes
1answer
51 views

How to draw magnetic lines of force in coil with Tikz?

I'm trying to draw the magnetic lines of force in a coil that should looks like this picture using the tikz package. I've tried to use a foreach loop with controls but (maybe I'm placing the controls ...
1
vote
1answer
23 views

Problem naming certain arrows in tikz-cd

There's something I'm doing wrong in a certain diagram, and I can't seem to figure out how to name an arrow that bends. Here's a MWE (both with the package tikzcd and tikz + library cd the same error ...
11
votes
2answers
1k views

Densest sphere packing

I would like to represent the densest sphere packing in dimension 3 as the following picture, for a beamer presentation. Is Tikz the way to go for it? It is not a real 3D drawing since I only want a ...
2
votes
1answer
37 views

pgfplots: axis tick labels within the frame of the plot

For quite some time, I have been searching for a way to insert axis tick labels of plots within the frame/area of the plot. I think it less disturbs the axis labels themselves. However, there is an ...
10
votes
5answers
3k views

Draw a symmetric alien head

I am trying to draw the following "symmetrical alien head": Using the mirror code from Can we mirror a part in tikz? I was able to produce the following result While the result looks good I am not ...
3
votes
2answers
52 views

Draw axis in block diagram

I would like to add plots inside TikZ nodes. Here is a minimum working example of the code I already have. \documentclass[]{standalone} \usepackage{pgf,tikz,pgfplots} \usetikzlibrary{calc,positioning}...
4
votes
1answer
57 views

Drawing colored sticks

I am trying to draw some "matrices" that looks like this So above the diagonal the sticks should be blue and below they should be red. Using some help from the answer by marmot in my previous ...
2
votes
1answer
30 views

Why does `\tkzInterLC` calculate the wrong radius?

The following description of a triangle is given: Let Δ ABC be a right angle triangle. With ∠ABC=90, AB=12cm, AC=15cm. The point D lies on AB such that DB = 7cm. The last point E lies on AC such ...
1
vote
1answer
42 views

Forest package: problems with height

I am having trouble with the height of the arrows, how can I fix it? \documentclass{article} \usepackage[edges]{forest} \usetikzlibrary{shadows.blur,shapes.multipart} \tikzset{grimsel/.style={...
5
votes
1answer
88 views

Effects on rectangles

I want to make my diagram’s rectangles look like these, the arrows and rectangles are in bold plus they have a shadow effect: Right now they look like this: \documentclass{article} \usepackage[...
3
votes
1answer
101 views

Hierarchy diagram

I’m trying to resemble what’s on the picture by using a template. \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[level 1/.style={sibling ...
6
votes
2answers
155 views

Drawing text in between arrows using TIKZ

Hi dear TeX community! I hope you can help me out a bit with some matrices I have drawn (with the community's help of course) using the TIKZ package. I think that I need to post almost the whole ...
0
votes
1answer
49 views

how to plot function from multiple points

Actually wanted to draw and plot Optical and acoustic branch but don't know it what's the command to draw a function like this ? Thanks for the help
3
votes
1answer
81 views

curve from given points and tangents

This is the inverse problem of that. At that I wanted the tangents given the curve. This time I want the curve given the tangents. I 'll explain it! Given: some points A, B, C,... and K, L, M,... ...
2
votes
1answer
89 views

many tangents to a curve [duplicate]

I use this for draw tangents to an arbitrary plot. For example: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \usetikzlibrary{intersections} \makeatletter \...
4
votes
1answer
131 views

Graphing large functions in LaTeX

I want to graph a function with rather large values using the pgfplots package. The function is represented as (1375*(801-2.96*x)/(x*(18-0.1*x). The code I have currently is: \begin{tikzpicture} \...
1
vote
1answer
26 views

Want to plot curve from points and want to remove axis values

Actually want to draw this curve exactly but dunno how to plot it from the points and can't remove the axis values \begin{figure} \centering \begin{tikzpicture} \begin{axis}[ grid style=dashed, ]...
3
votes
1answer
48 views

Making a custom circuit element in circuitikz

I am writing intro physics exams in LaTeX, using the circuitikz package to make circuits. A lot of the circuits use simple light bulbs, which we represent as a circle with a curly-cue inside. ...
1
vote
1answer
67 views

tikz, find the point which is closest to another point

At the moment, I try to learn automation of graphic drawing with latex (tikz) and R. I need to determine the coordinates of the point with the smallest distance to a defined point "North" Thats what ...
1
vote
1answer
55 views

Draw contour plot for norm penalty term using TikZ

I would like to draw the following contour plots in $\LaTeX$ using the TikZ package. My script for drawing the contour plots for ridge (q=2) and lasso regression (q=1) are below. The first block of ...
2
votes
1answer
24 views

parallel shifting of arbitrary path with to[bend=..] but only between two given coordinates

I am trying to change TikZ: draw only a certain central length of a given path to fit my needs. I have a path that is built with \draw (A) to [bend right=30] (B); I want to now shift this path in a ...
0
votes
1answer
29 views

Is it possible to auto adjust line's width between text in Tikz?

I want to draw line between text and adjust line's width so that it does not overflow to next line. \begin{document} AAAAAAAAAAA\tikz\draw[blue] (0,0) -- (4,0);BBBBBBBBBBBBBBBBBBBBBBBBBBBBB \tikz\...
3
votes
1answer
56 views

Edge of rotated image when using tcolorbox and tikz

I'm using tikz to draw a square and tcolorbox skins to fill the square with an image. The problem is when I try to rotate the image. \documentclass[margin=5cm]{standalone} \usepackage{tikz} \...
3
votes
3answers
49 views

intersection point of bisector in triangle

\usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings} \usepackage{tkz-euclide} \usetkzobj{all} \usepackage{tikz} \usepackage[utf8]{inputenc} \usepackage[english,greek]{...
1
vote
0answers
40 views

Rotate tikz markers

I need to follow the same pattern regarding the position of the markers, (like if the line is pointing down then the marker has to point down etc) as they appear in this picture: \documentclass{...
6
votes
1answer
60 views

Why is an overlay tikzpicture introducing extraneous vertical spacing before a section?

Here is my MWE: \documentclass[10pt]{article} \usepackage{showframe} \usepackage{geometry} \usepackage{tikz} \usepackage{titlesec} \titlespacing*{\section}{0pt}{0pt}{0pt} \begin{document}% \...
1
vote
1answer
49 views

TikZ Grid Paper With Node Coordinates

I suck at drawing with TikZ, and it takes forever, so I decided I need a new approach. When I use Illustrator and Inkscape, I like to start with a grid; like graph paper. So now I do this (below), so ...
4
votes
1answer
74 views

TiKZ image of a triple cover of a circle

I would like to make a TiKZ image of this picture. It shows a circle lying coiled three times around, stacked over another circle. (For topologists, a degree three map of the circle to itself.) I ...
1
vote
2answers
36 views

How do I draw only the beginning and the end of an arrow from one node to another?

I am trying to create a node-network using pdflatex and have something very specific in mind. Below, you can find my current minimal example as a tex file that I have a problem with (compilable with ...
1
vote
1answer
32 views

tkzKiviatGrad skip number

I am writing up a paper that has bipolar results ranging from -3 to 3 but excluding 0. How can I skip it. I am already using something in the preamble to shift the numbers down three to achieve -3 ...
6
votes
2answers
931 views

TiKZ won't graph 1/sqrt(x)

Evening! Posting a quick message here cause I have a small problem with TiKZ. I've been trying to plot the function 1/sqrt(x), and it just... won't work. Here is the code I've been typing: \begin{...
2
votes
4answers
67 views

How to find the length of a PGF array even if it's in a macro?

One of the answers to a question about how to calculate the length of a PGF array provided a function that increments a counter for each step of the iteration on the array provided as its argument. ...
0
votes
0answers
40 views

How can I include a TikZ picture into a beamer slide without losing proportions?

For work I need to put a TikZ-Picture into a beamer presentation. For the presentation I was given a template and the pictures are also written by someone else, so unfortunately, I'm not able to ...
0
votes
1answer
42 views

How I can put the following two figure side by side? [duplicate]

\documentclass[a4paper, 12pt]{article} \usepackage{amsfonts} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}[scale=0.90, acteur/.style = {circle, ...
2
votes
2answers
68 views

Dissapearing of table/cell borders with coloured cells in the PDF viewer depending on the zoom

I have a problem with the coloured tables that I want to include in my master thesis, so it is a very important issue for me. I generate the tables with tablesgenerator.com, and in the LaTeX viewer ...
6
votes
1answer
86 views

How to adjust arrow head size of arrow-node?

I am trying to use single arrow node from shapes.arrows TikZ library. The problem is with the proper adjustment of the arrow tip span - with the argument single arrow head extend. MWE: \documentclass{...
2
votes
1answer
33 views

How to put arrow head in latex? [duplicate]

\documentclass[a4paper, 12pt]{article} \usepackage{amsfonts} \usepackage{tikz} \usepackage{amsmath} \newtheorem{theorem}{Theorem} \newtheorem{example}[theorem]{Example} \begin{document} \begin{...
1
vote
1answer
25 views

Command not producing expected output

This is a follow-on question from here. Things are almost working but something strange is going on with my \band command. It renders the first band correctly, but then the second band causes things ...
0
votes
1answer
40 views

Tikz graph for sine function of y=sin(2x+pi/3)

I am looking to create the sine graph for function y=sin(2x+pi/3), but it looks straight line. \begin{tikzpicture} \begin{axis}[axis lines=middle,axis on top,xlabel=$x$,ylabel=$y$, xmin=-4,xmax=4,...
3
votes
2answers
49 views

Using foreachitem inside a \draw command

I'm trying to dynamically construct a \draw command inside a tikz picture like this: \documentclass[]{scrartcl} \usepackage{tikz} \usepackage{listofitems} \begin{document} \begin{tikzpicture} \...
2
votes
2answers
33 views

Problem with x tick label

Hello fellows and folks! I am trying to get rid of the .10^-3 in the x label, but something is wrong and I cannot find the bug. I tried with x tick label style={/pgf/number format/.cd,fixed,fixed ...
4
votes
1answer
56 views

Dots at the end of a function in tikz

When using tikz to plot a function, a certain domain has to be specified. However, if the function continues outside of the specified domain, it would be nice to have the classical three dots at the ...
2
votes
1answer
33 views

Drawing a set with a particular shape

I would like to draw a non-convex set as in the following image and I like to start from my MWE: \documentclass[12pt,a4paper]{book} \usepackage{tikz} \usetikzlibrary{calc, shadings} \usetikzlibrary{...