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.

learn more… | top users | synonyms (3)

2
votes
1answer
135 views

How to select a color for each value in a foreach in TikZ?

With the code \documentclass{standalone} \usepackage{tikz} \usepackage{xcolor} \begin{document} \begin{tikzpicture} \foreach \i in {1,...,10} { \pgfmathparse{\i * 10-10} ...
1
vote
1answer
81 views

Vector diagram using Tikz

How would one go about producing the following vector diagram using TikZ?
3
votes
2answers
116 views

simplify a flowchart drawn using tikz

Here is a flowchart drawn using tikz. This is lot of code. The positions of some objects are computed by trial and error. How do I simplify it. Also how to make arrows connecting block 4 with the ...
4
votes
1answer
47 views

Buggy behavior of tkzMarkAngle

I'm trying to mark an angle on a 3d plot with \tkzMarkAngle which seems to behave quite oddly in combination with \tdplotsetmaincoords Here's what I mean, below is the minimal example: ...
3
votes
1answer
47 views

TikZpicture/pgfplots: How to insert time-data in mm:ss-format (without hh:) into x-axis?

Imagine an ordinary x/y-diagram by using the pgfplots/tikzpicture-packages: In case of regular date-values (dd-mm-yyyy) usually there is no problem in application. But now, I have to add times-values ...
-1
votes
1answer
116 views

A Neural Network in Latex

I am new to latex, wanted to draw these diagrams for the background section of my thesis. Could get the snapshot but doesn't look good. Any help would be much appreciated.
0
votes
2answers
45 views

Add labels to tikzpicture plots

How do you add labels like A and B to the two plots below? I tried some variations of \node (A) at ([xshift=-1.3cm, yshift=1cm]group c1r1.north west) {\color{black} (A)};, but this didn't work, ...
2
votes
1answer
28 views

Scaled tick option not working

I'm trying to plot some time series data using pgfplots. I do not want any "tick scaling" (i.e. scientific notation for my axis). I have tried the scaled ticksand scaled y ticks options, setting them ...
1
vote
1answer
29 views

Set origin of y axis to 1

How to set the origin of y axis to 1? Minimal example: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{figure} \centering \begin{tikzpicture} ...
3
votes
1answer
52 views

Set line width independently of arrow size

I would like to use lines with arrowheads in a Tikz drawing. The lines should have different thicknesses/widths, like so: Another answer here pointed out the line width attribute to modify the ...
6
votes
5answers
298 views

How can I draw several polygons on the same base line using TikZ?

I want to construct a figure that will be symmetrical polygons on the same base. So, there is an equilateral triangle, a square, a pentagon, a hexagon, etc. one side of all these is the same ...
2
votes
1answer
51 views

How to add packages in tikz using R

I wrote the following commands in R to generate a picture. However, the y-axis label is missing as the picture below shows. There seems to be some error in ylab="$\\ln \\mathbb V ...
4
votes
2answers
61 views

Connecting sections of a venn diagram with arrows

What I am looking to do is to connect particular intersections of a venn diagram in 3 variables, with arrows. So for example, I manipulated the code here: Venn Diagrams and shaded the intersections ...
7
votes
1answer
115 views

Horizontal space before TikZ picture

The horizontal bar from the following MWE does not start at the left edge of the paper as expected, but rather a bit more to the right. The line is 17cm long and the page width is also 17cm, which ...
6
votes
1answer
142 views

Rømer wheels in TikZ - wrong length of the spiral arc?

I'm trying to draw a pair of so called Rømer wheels: These are two logarithmic spirals rolling on each other, one clockwise and the other counterclockwise, but my equation for rotation angle of ...
3
votes
2answers
186 views

How can I draw texts within a cartesian coordinate system with TikZ?

I am new to TikZ and was wondering how to draw a simple figure as given below.
7
votes
2answers
117 views

Can \foreach handle list of lists?

This code draws the first hexagram of the I Ching: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{math} \usepackage{ifthen} \begin{document} \begin{tikzpicture} \tikzset{ ...
1
vote
1answer
37 views

Assign a coordinate in polar method, with an origin different than (0,0)

I have the followint MWE. I am trying to calculate the coordinate of the upper point end of the blue line, determined initially by +(45:2), and assign this coordinate to point B. Don't know how to do ...
5
votes
1answer
60 views

Plotting piecewise function using declare function

I am trying to plot a piecewise defined function, but somehow I don't manage to get it right. See below. I use the following code \begin{tikzpicture}[ declare function={ func(\x)=(\x >8/10) * ...
5
votes
2answers
114 views

function epigraph possibly using fillbetween

I want to shade and label the epigraph (region above a function) of different functions in latex, and have tried to use fillbetween, though im not quite sure how to do this as usually I specify two ...
0
votes
1answer
61 views

How to color multiple plots in rainbow colors?

I´m trying to color multiple curves of a line in rainbow colors wiht tikz. I´ve found the [wave] option for color from the xcolor pagacke, but I can't get it to work inside tikz's draw command. ...
2
votes
1answer
67 views

Generating Plot in Tikz from Text File

I am trying to learn how to generate a plot given coordinates specificied in a text file, for example, the latex code in: https://github.com/daleroberts/obstacle-problem/blob/master/figures/fig1.tex ...
5
votes
1answer
97 views

How to draw a complex graph

I can draw a simple graph like this, but if I want to draw a complex one like this, I feel frustrated. How could I do it? The following are the codes which I drawn the first graph. ...
6
votes
2answers
90 views

How can I continue using both pageslts and tikz?

A recent update to my TeX Live installation appears to have given rise to an incompatibility between two packages: pageslts and tikz. The following document does not compile: \documentclass{article} ...
4
votes
1answer
60 views

Drawing a shape or lines on xy axes, 10 times to small

When I want to draw a rectangle on the xy axes, I need to multiply all the digits by ten. What am I doing wrong? \documentclass[symmetric,justified,a4paper]{tufte-book} % use larger type; default ...
7
votes
2answers
168 views

Sphere Tangent to Plane

I'm trying to draw Sphere Tangent to Plane to looks like that : i'm using : \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} [ ...
2
votes
1answer
47 views

customize edges in tikz-qtree

Considering the following code, \documentclass{beamer} \usepackage{tikz} \usepackage{tikz-qtree} \begin{document} \begin{frame} \begin{tikzpicture} \tikzset{level 1/.style={level ...
3
votes
1answer
70 views

Tikz-Diagram: How to define relative positions for arrows, straight lines and labels

Today I am trying to reproduce several economic diagrams. Here is an example of a phase diagram: I would like to use a tikzpicture environment. But I have no idea how to start creating the axis in ...
4
votes
1answer
105 views

Surface of revolution in pgfplots

I'm looking to make a plot for a latex report I'm writing. Effectively the plot is a paraboloid sat ontop of a circle but I'm having some issue creating the surface of revolution for the paraboloid. ...
3
votes
2answers
55 views

TiKz tree, i need to force move a node down

I'm making this tikz figure But i want to move the [ A C C T] box down on the same levvel as the other 3.. That is making the path line longer to the right and longer down. Please help. Code: ...
2
votes
1answer
39 views

Tikz - decorations.markings marks location problem

Why blue and red lines don't fit the black line, and why are they overlap each other ? \documentclass[tikz,margin=5pt]{standalone} \usetikzlibrary{calc} \usetikzlibrary{decorations.markings} ...
1
vote
0answers
31 views

Shading in a rotation without a canvas transformation

I'm currently working on a magnifying glass as an object without making use of the spy library. It is written as a \newcommand since I have to use it to some extense. My problem is the shading for the ...
1
vote
0answers
24 views

Debugging texlive-pgf sources [closed]

I've recently changed operating systems (from Ubuntu 14.04 to Fedora 22) and this means in particular that I now have a newer version of the pgf package. To be precise, it is this version: ...
1
vote
0answers
24 views

Tikz : Draw a double bicolor line on a partial rectiligne path [duplicate]

I try to draw a bicolor line (only a part of a rectiligne path). It works for horizontal lines, but obviously what I did can't work for oblique or verticale line. Is it possible ? As a tikzstyle ...
1
vote
0answers
27 views

Eliminating excessive spacing in bar graphs

How can I eliminate the spacing to the left and right of my bar graph? \documentclass[12pt]{report} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{figure} \begin{tikzpicture} ...
4
votes
1answer
45 views

tikz standalone does not show drawn arrows

I drew some arrows to annotate a figure using standalone. However, when I put in [tikz]{standalone} the arrows do not show. If I use report or remove the [tikz] then the arrows show up, however, I ...
4
votes
1answer
67 views

Change the anchor points of an arrow

How to change the starting and ending positions of the arrow on the ellipses ? \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz} ...
6
votes
1answer
118 views

How to increase legend lines lengths in PGFplots

I want to know how I can make PGFplots to draw longer segments in the legend. I looked at couple of previously asked questions and none seemed to work for me. In this question: "adjust the legend ...
6
votes
2answers
91 views

Three dimensional Regression Plan with Residuals

In R, I can make three dimensional Regression plane with residuals with the following command scatter3d(prestige ~ income + education, data=Duncan) with scatter3d function from car R package. I ...
4
votes
1answer
83 views

Shaded 3D ellipsoid with pgfplot

I'm trying to display a shaded 3D ellipsoid with axis labels with PGFplots. So far I achieved this. \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots,tikz-3dplot} \begin{document} ...
3
votes
1answer
135 views

Meaning of the command

I have used the following very simple command to draw ellipse-type partial curves. But, I didn't get the meaning of the parameters used there. The command is \draw (4,0) arc (0:180:4 and 1); ...
3
votes
3answers
101 views

How to plot Venn diagrams representing intersection and complement

How do you plot the following Venn diagram using latex? I actually managed to plot the "union" case using the following: \begin{tikzpicture}[fill=gray] % left hand \scope \clip (-2,-2) rectangle ...
1
vote
0answers
65 views

Digamma function in Latex

I am trying to produce a 3d plot of the following function in latex using tikz: where psi(a) is the digamma function, I'm not really sure how I can write this function in latex code? or if it ...
1
vote
2answers
59 views

Tikz - parametrically set node text

I want to have a circle of nodes in tikz, and the text in each node needs to come from an array. How do I achieve this? The following does not work. \documentclass{article} \usepackage{tikz} ...
3
votes
2answers
104 views

How to create an extra box in this figure?

I have now spent hours by solving my problem - without luck. I would like to create the following figure: My problem is, that I do not know, how to create an extra box in the middle. My preamble ...
5
votes
3answers
264 views

Help with size of an image for a book

\documentclass{article} \usepackage[papersize={11in,8.5in},margin=0in]{geometry} \usepackage{tikz} \usetikzlibrary{calc} \parindent=0pt \begin{document} \begin{tikzpicture}% \node[anchor=south ...
3
votes
1answer
64 views

page break issue with tcolorbox's height fixed for

When using the height fixed for=first and middle option on a tcolorbox, the page break behavior becomes awkward. Try uncommenting the identified line in the following MWE to see what happens. ...
2
votes
1answer
50 views

Tikz 2 part line to label item

I'm looking for a way to construct the line (image attached showing 2 different possibilities) in Tikz without using a node at the junction point of the two line segments (horizontal and diagonal). I ...
0
votes
1answer
53 views

Need code for Beamer presentation

For my presentation using beamer I need code for this image structure. can anyone help me??
1
vote
0answers
37 views

Adding dipole moments in chemfig

I haven't been able to find anything in chemfig for adding dipole moments to my molecules beyond creating custom arrows with tikz, which is more involved than I'd like at the moment. Is there some ...