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.

Filter by
Sorted by
Tagged with
0
votes
1answer
19 views

How to plot a function on a limited domain?

Suppose you have the function h defined on the set {1,2,3} with h(x)=x^2-3 and you want to graph it using tikz. How can you do it? Please help. Thanks!
1
vote
1answer
31 views

tikz - how to fading path like this sample with tikz

see this image, how can tike fading path the same?
3
votes
1answer
41 views

How to create a function diagram in tikz?

\begin{tikzpicture}[ every node/.style={on grid}, setA/.style={circle,inner sep=2pt}, every fit/.style={draw,ellipse,text width=25pt}, >=latex ...
-2
votes
1answer
31 views

Relations Diagram(Directed graph)-Digraph

Draw relationship graphs:(digraph) m-n in example b is an even number
0
votes
1answer
35 views

tikz: how to draw this flowchart

I would like to draw a flowchart similar to the one in the picture, but have absolutely no idea as to how go about it. I have only used tikz-qtree for drawing trees thus far, so I would be immensely ...
0
votes
0answers
8 views

How to add 'additional' x-axis labels? [duplicate]

I produce the following chart: With this code: \documentclass{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=1.8} %colors \usepackage{color} % colors \usepackage{...
0
votes
1answer
19 views

Adding a horizontal dashed line in a tikz picture

I'm trying to add a red horizontal dashed line at 3.0283 in the tikz picture with code below. The options I've tried to far have either not compiled or made one dash at (0,3.0283). Any suggests ...
1
vote
1answer
16 views

PGFPLOTs: Add tikz-coordinate to each coordinate of a addplot command

This is a follow up question to: PGFPLOTS: Drawings inside a bar of a barplot I created a stack bar plot with coordinates at the bars such that I can draw arrows and other stuff inside the bar ...
0
votes
1answer
20 views

Set axis ratio / scale in pgfplots axis in TikZ

I've got the following tikzpicture setup where I'm drawing a circle on top of an x-y plane. I'm using the axis environment from the pgfplotpackage, however by setting the x and y limits my graph is ...
2
votes
2answers
95 views

How to define discrete color map automatically in TikZ

Is it possible to define automatically total colors equally distributed in the color map below? I mean, for i from 1 to total I'd like to get a color c-i, where c-0 is the left most blue color and c-...
0
votes
2answers
25 views

Aligning tikzpictures with equations and user-defined commands

I am trying to aligned the following diagrams to the center. Somehow I just cannot do it. I tried scope, baseline and \vbox and even wrapping with \begin{matrix}\end{matrix}. All of them give the ...
1
vote
1answer
22 views

Why does rotate option not rotate all objects (except labels) of my pic?

I've a pic including a spacecraft and a local frame attached to it as below. pics/spacecraft/.style n args={2}{ code={ \node [shape=rectangle, draw, fill=gray!30, inner sep=0pt, ...
1
vote
1answer
27 views

Tickzpicture graph origin labels

Can anyone tell me how to output "12 pm" instead of 0 for the initial time? For some reason, 0 is overriding the label I have specified. I also want to put 0 for the initial vertical value, but ...
1
vote
1answer
20 views

Problem on map name on arrow

I have an issue with double map: I can't put the maps names on the right place, one on the top of the arrow, the other on the bottom. \begin{tikzcd} X'' \arrow[r, shift right, "", "h"] \...
1
vote
1answer
53 views

How to add small bump like features (small Gaussian-like features) on this blue curve?

I am making the following picture using the below code. I want to add some small 4-5 "bumps" (sort of like small Gaussian wavepackets) in the topmost quadrant on the blue curve like in this picture. ...
1
vote
1answer
28 views

Modifying chemmacros arrow labels

How can I recreate the following image? I tried using the chemmacros package, but it doesn't seem to work all the way. Please let me know. \documentclass[tikz,border=3mm]{article} \usepackage{tikz} \...
3
votes
0answers
57 views

How can I show a compass and a ruler in Beamer animation

I want to show a ruler and a compass in my beamer animation same as the gif below. Here is my code: \documentclass[dvipsnames,mathserif,fleqn]{beamer} \usepackage{tikz,xparse} \...
0
votes
1answer
43 views

PGFPLOTS: Drawings inside a bar of a barplot

I have the following problem with a xbar stacked plot. The plot consist of three datasets and I want to draw two arrows at the beginning and the end of the second data set to highlight that the ...
2
votes
1answer
30 views

Different line styles for different sections of a plot?

Is there a way to apply different line styles for sections of a plot? As an example, for having a part of a graph dotted as shown below, I currently add three separate plots: \documentclass[tikz]{...
0
votes
3answers
77 views

How to make sigmoid function at Tikz?

I'm trying to make something like this at Tikz: The function is: y=1/(1+e^(-x)) but I don't know how to do it because the axis are at different scales. Can you help me with it? Thank you! P.S. I'd ...
0
votes
1answer
57 views

Drawing equipments in tikz

Is it possible to draw something like the following with tikz? If so, how should I start it? It looked way too advanced for me to have an idea of where to start off. Please let me know.
7
votes
1answer
352 views

Tagging an equation with a tikz duck

I would like to label and equation with a tikz duck from the tikzducks package and refer back to it later, like so: The obvious solution: \usepackage{tikz} \usepackage{tikzducks} \usepackage{amsmath}...
1
vote
2answers
99 views

How to draw simple spring mass system?

Can I get anybody to help me with drawing this spring mass system in LaTeX? I've tried using another code for a spring mass system in here, but unfortunately I can't get it modified as I want. ...
3
votes
2answers
155 views

Tikzpicture with caption

How I do a caption in Tikz? e.g. \begin{tikzpicture} \draw (0,0) -- (4,0) -- (4,4) -- (0,4) -- (0,0); \caption{Cuadrado} \end{tikzpicture} is an error.
1
vote
1answer
55 views

how can I draw it in the Venn diagram- A ⊕ B ⊆ (A ⊕ C) ∪ (B ⊕ C)

Using Venn diagrams, prove the relationships: A ⊕ B ⊆ (A ⊕ C) ∪ (B ⊕ C) thanks for the help
2
votes
1answer
28 views

Position labels inside circuitikz reisistors

I'm trying to position the labels for (european) resistors in circuitikz inside the resistors, but it automatically positions them besides the boxes and I get this: \documentclass[12pt,a4paper]{...
4
votes
2answers
65 views

How to position legend at corner of tikxpicture bounding box?

I've created a block diagram and want to add a legend to it which should be positioned in the very top left corner. I've setup a custom environment for the legend according to the answer to this ...
3
votes
3answers
154 views

Drawing overlap between annulus and rectangle in TikZ?

I am trying to recreate the image posted. So far I have managed to draw an annulus in the first quadrant but I am struggling to get a rectangle overlapping and highlighted in the region. In words, I ...
0
votes
1answer
43 views

How can I add week number and frame in Calendar Tikzpicture LaTex?

I have a following code. \documentclass[landscape,a4paper, ngerman, 10pt]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[german]{translator} \usepackage[T1]{fontenc} \...
-1
votes
1answer
69 views

Can somebody help we draw following complex figure using tikz?

Can somebody help we draw following complex figure using tikz?
3
votes
0answers
23 views

tikz-cd `equal` option produces faint edge across “gap” at ends of path

I want to draw an arrow as an equals sign in a commutative diagram. This should be possible using the equal option provided by tikz-cd. As pointed out in Long equals in tikz, this produces a faint ...
4
votes
1answer
53 views

problem with fadings and pic

I try to generate several copies of a faded text using the PG 3.0 pic feature but something with the placement went wrong. Only the one at the origin is drawn. Here is what I have done: \...
2
votes
1answer
35 views

Drawing curved objects side by side with braces

I am trying to recreate the two following diagrams, but don't know how to shift the beaker to the right. I tried hspace but it did nothing. Also, how would I do the braces on the left with the text in ...
1
vote
1answer
29 views

Error with nest array in function [closed]

\usetikzlibrary{calc} \newcommand{\matmul}[3]{% \foreach \i [count=\ci] in {#3}{% \foreach \j [count=\cj] in {#2}{% \pgfmathparse{{\i}[0]*{\j}[0]+{\i}[1]*{\j}[1]+{\i}[2]*{\j}[2]}% \ifnum\cj=1% \xdef\...
0
votes
1answer
28 views

Tikz creating an array with for each

I have this code ,tex \newcommand{\matmul}[3]{ \def#1{} \foreach \i in {#3}{ \def\temp{} \foreach \j in {#2}{ \pgfmathparse{\i*\j} \xdef\temp{\temp,\pgfmathresult} } \xdef#1{#1,{\temp}} } } \matmul{\...
3
votes
1answer
75 views

Drawing TLC Plates in tikz

So I am trying to create the following image: It was going smoothly, but then I couldn't figure out how to place in the words and the dots. I tried using the node but it produced something huge and I ...
0
votes
1answer
26 views

Extracting arrays from a pgfmathdeclarefunction

So if I have \pgfmathdeclarefunction{yeet}{...}{ \begingroup \def\temp{#1} \pgfmathsmuggle\temp \endgroup } How can I save \temp to a new variable/array. In {1,2,3} format? If I use pgfmathparse ...
0
votes
0answers
25 views

\usetikzlibrary{shapes} : shapes library not available: mac

I am trying to figure out tikz with the help of various video tutorials and help pages. They all tell me to use \usetikzlibrary{shapes}. But texstudio tells me that there is an "unrecognized key in ...
1
vote
1answer
28 views

Subfigure sizes are not equal? creating tikzpictures (using standalone package - MWE included)

I use the standalone package and create my tikz pictures in a seperate .tex file. I create a subfigure in the chapter I want it to be and when I compile main.tex the subfigures is loaded. I created a ...
0
votes
0answers
16 views

Tikz arrays inside pgfmathdeclarefunction```

\makeatletter \pgfmathdeclarefunction{yeet}{2}{ \begingroup \pgfmathparse{1,2,#1+#2} \pgfmathsmuggle\pgfmathresult \endgroup } \makeatother \pgfmathparse{yeet(1,2)}\pgfmathresult I have this code ...
1
vote
1answer
53 views

How to remove white space from tikzpikture

I have white spaces in my pictures. How can I remove them? \documentclass{standalone} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all} \usetikzlibrary{calc} \begin{document} \begin{...
0
votes
1answer
32 views

Putting a tikzpicture in a vwcol

I would like to add tikzpictures into a portion of text that is in multiple columns. I tried to do this: \documentclass[]{article} \usepackage{tikz} \usepackage{vwcol} \usepackage{lipsum} \begin{...
0
votes
0answers
21 views

pgf plot contours help required

I have made the pgfplots for the attached picturs with help of stackexchange and Schrödinger's cat except the contours on the surface of the sample figure attached. if somebody can help me in ...
0
votes
1answer
50 views

Reproduction figure with Pgfplot

I need your help, I have to reproduce this figure to explain Peak Over Threshold method (POT) using Pgfplot. Thank you for your response.
0
votes
1answer
50 views

how can i insert cylinder in cone in the given figure

How can we fit the cylinder using the following code into the cone, please help, I am unable to fit this cylinder in the cone... will be very helpful. \documentclass{article} \usepackage{amsmath} \...
1
vote
1answer
34 views

Cell Width in Tikzpicture creating error due to text width

I have the following code. % DIN-A4 doublesided year calendar % Author: Robert Krause % License : Creative Commons attribution license % Submitted to TeXample.net on 13 July 2012 \documentclass[...
2
votes
2answers
51 views

Path decoration disappears when adding a pattern

I would like to fill the area under a curve with a pattern. The curve has arrows as decoration. Filling the area with a color works fine. If I replace the fill with a pattern the arrow decorations ...
5
votes
1answer
124 views

TikZ-Feynman: how to draw scattering Feynman diagram

I would like to produce the following Feynman diagram using the TikZ-Feynman package. So far this is what I have: \begin{tikzpicture} \begin{feynman} \vertex (li); \vertex [below=2cm of li] (hi); \...
0
votes
1answer
27 views

Double foreach loop in node child (TikZ tree)

I'm trying to typeset probability trees with TikZ, with many branches, so I would prefer to avoid full typing. I cannot figure out how to make kind of a double loop. Here is an example of what I ...
3
votes
0answers
36 views

Dual commutative diagrams

I use tikz-cd to draw my commutative diagrams, like the following: \documentclass{scrartcl} \usepackage{tikz-cd} \begin{document} \begin{equation} \begin{tikzcd}[row sep=scriptsize] ...

1
2 3 4 5
507