The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
1
vote
1answer
64 views

TIKZ Macro for simple graduated axis

could help me to get a macro to draw such axis if I specify : the beginning and the end of the axis (not necessarily integers) how it should be graduated a list of points with coordinates and names ...
1
vote
1answer
24 views

Changing bar plot style

How can I achieve the same font style and plot style as in the screenshot? \documentclass[border=10pt]{standalone} \usepackage{verbatim} \usepackage{pgfplots} \pgfplotsset{width=7cm,compat=1.8} \...
1
vote
1answer
40 views

Visualizing contour lines in pgfplots

I want to visualize the set of zeros of $f(x,y)=x^2(x^2+y^2-2)$ in the same graphic that contains the plot of the function. It is easy to see that this set is the union of the circle of radius sqrt(2)...
0
votes
1answer
39 views

macros expanding to a TikZ node

I want to create rectangular nodes, given two coordinates bottom left and top right, with a macro. The difficult part is that I want to use the macro where a node name can be used; for example, in the ...
5
votes
2answers
70 views

Tikz – Box/frame arround Text with interruption

does somebody know a trick for creating a box/frame lite this around a text like this: I guess it could be working best with tikz. Here is the code for the text (without frame): \documentclass{...
2
votes
1answer
48 views

How to have two root nodes in forest package?

I'm using forest to make trees. This package automates the measurements and placements of the nodes (which is great!!) I want a node of a forest-tree to be accommodated in two trees. Have a look at ...
3
votes
1answer
58 views

Phantom nodes for TikZ animation

I am writing an animation in TikZ, where I often have one node appearing in different contexts and want to animate the path it takes from one setting to the other, for now I am preparing the settings ...
5
votes
3answers
297 views

Overlay image with parts of another image

I have the following image Is there some way for me in Tikz, to remove the part to the right of the white line, and insert it with a slide of another image? Ideally I should be able to select 0-1 ...
0
votes
1answer
73 views

How to plot x^2*weierstrass?

I use the code below for drawing the Weierstrass function (from here). How can I change it to draw x²·weierstrass(x)? \documentclass[margin=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{fpu} \...
0
votes
1answer
72 views

Cannot draw arrows in a graph

I have the following code for a graph: \begin{tikzpicture}[blueringnode/.style={circle, draw=blue!100, fill=white, thick, minimum size = 7mm}, redfillnode/.style={circle, draw=black!100, fill=red!100,...
0
votes
1answer
34 views

How to write numbers relative to an arrow while making a directed graph?

I need to display a directed graph on a LaTeX document, it should look like this: but I can't find how to write the numbers above, below, right o left to a line or an arrow, can someone give a ...
0
votes
1answer
57 views

Bar Chart - Insert text on the bars

I want to use this latex module (copied from here) to draw a bar chart. \newcounter{barcount} % draw a bar chart % param 1: width % param 2: height % param 3: border color % param 4: label text ...
24
votes
1answer
2k views

Can I color text by using an image, so that the color isn't flat?

I'm using tikz to attempt to make a book cover, and I have a "wallpaper" image that looks like leather (not that I've handled that many leather-bound books). I'm using the node command to place text ...
4
votes
2answers
168 views

tikz declare function with multiple outputs

Is it possible to declare a function in tikz or pgfplots with multiple outputs? Consider the case when we want to plot samples from a probability distribution. Usually we could do something like \...
1
vote
2answers
65 views

Mark lines parallel with colored arrows

I drew the parallelogram below using the tkz-euclide by adapting J. Leon V's answer to the question Place parallel line markers on parallel lines. I adapted the arrow style from user121799's ...
0
votes
1answer
40 views

Height function for 3D drawing

I've been drawing 2D features in 3D space using code like the following: \begin{tikzpicture}[x={(-0.2cm,-0.4cm)}, y={(1cm,0cm)}, z={(0cm,1cm)}]{ \begin{scope}[canvas is yx plane at z=1] \draw[...
2
votes
1answer
39 views

What is wrong with my plot?

My plot as shown below is not reflecting the upper cap surface exactly as I have defined it (I simply negated the z-ordinate of the parametric equations) Is this some kind of numerical bug? \...
2
votes
2answers
108 views

Flow chart and a polyline

I would like to improve the following code : my problem is explained in the screenshot. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows,calc} \...
5
votes
1answer
130 views

Venn diagrams show + - = underneath

I have the following code: \documentclass{article} \usepackage{venndiagram} \usepackage{multicol} \begin{document} \begin{figure} \begin{multicols}{4} \centering \begin{venndiagram2sets}[...
0
votes
1answer
45 views

Multicolored grid of nodes

I am trying to draw a grid of nodes, where each node has a different color: I learnt how to draw a grid of nodes from the solution to: TikZ: Using Loop to Draw Grid of Nodes This gives the grid ...
0
votes
0answers
27 views

Is there a recommended strategy to handle/prevent 'overfull \hbox' with tikzpicture?

For some tikepictures I use the default coordinate system. Like the example below the coordinates (seem to) have a fixed default distance, such that the maximum y and xcoordinates is defined by the ...
0
votes
1answer
69 views

Tikz fill only the A - B - C of three shapes

I am trying to draw a graph that can be represented as boolean operations on three shapes: A, B, C. The graph is A - B - C (or A - (B U C)). However, I have no Idea how to draw it using \clip or other ...
1
vote
1answer
37 views

Incompatibility between soul/tikz and accents package

The following code throws an error. \documentclass{amsart} \usepackage{accents} \usepackage{tikz} \usepackage{soul} \def\ubar#1{\underaccent{\bar}{#1}} \begin{document} $\ubar{x}$ \hl{$\bar{x}$} \hl{$...
0
votes
1answer
63 views

A better way to number lines with tikz

I've managed to number a series of lines in a page (as in an exam sheet) using tikz, but it feels awkward and somewhat sketchy. Is there any way to improve it or make it "cleaner" (with or without ...
0
votes
1answer
69 views

Within one document, can I copy&paste rectangular crops of earlier pages onto the current page?

I currently generate a big DIN A1 single-page PDF with TikZ (i.e. a big picture). In a second document I grab sections of this big picture PDF page with the TeX package pdfpages and put them in ...
0
votes
0answers
62 views

Plot : e^x*sin(x^2+y^2)

I want to plot the equation: e^x*sin(x^2+y^2), but the result in LaTeX is clearly different with the actual graph drawn with Geogebra. What is the reason? \usepackage{pgfplots} \begin{document} \...
0
votes
0answers
25 views

Function graphics not showing with \tkzFct

That's what I'm doing, everything works fine but the graphic of the function. \documentclass{standalone} \usepackage{tkz-fct} \begin{document} \begin{tikzpicture} \tkzInit[xmax= 110,xstep=...
3
votes
1answer
61 views

How to have shader=interp gradient follow a different direction?

The shading of the interp option in 3D surface plots always has vertically shifting gradients. Is there a way to obtain horizontal gradients? Example image below, only instead imagine the right side ...
1
vote
1answer
27 views

Specifying the size of svg from standalone Tikz figure

I'm currently using Tikz together with the standalone package to generate vector graphics, that I convert from pdf to svg using pdf2sg. To draw circuits I'm using circuitikz, but the question is ...
0
votes
0answers
28 views

Specify angle in newdimen (tikz)

I'm using newdimen all the time, as it is easier to fine-tune a graphic. However, I'm having troubles with defining an angle with newdimen. tikz complains if I leave a number without unit, and it ...
3
votes
1answer
83 views

How to draw these images with TikZ?

I had once the need to use these graphics: It seemed to be a simple table, but I was not able to draw randomly while crossing table lines, but with respect to the cell's coordinates (like in the ...
8
votes
1answer
205 views

Tikz diagonal filling pattern

I would like diagonal line pattern and I also found it in the documentation, but something goes wrong: The two pattern should consist of solid lines in two directions. MEW: \documentclass{article} \...
1
vote
1answer
29 views

Missing Semicolon in Pgfplots

I'm getting the "Package tikz Error: Giving up on this path. Did you forget a semicolon?" error, but I don't see any semicolon missing and the diagram displays as intended. I guess I just don't ...
2
votes
1answer
42 views

How to make the axes physically properly clip through a sphere?

I have only seen questions where people wanted the axis to be overlaid on top of the plot. I want to do something more advanced. I want the axes to be rendered behind where you would expect them to be ...
1
vote
1answer
31 views

How to obtain no mesh in 3D

\usepackage[a4paper,top=3cm,bottom=3cm,left=3cm,right=3cm,marginparwidth=1.75cm]{geometry} \usepackage{amsmath} \usepackage{amssymb} \usepackage{tikz} \usepackage{pgfplots} \usepgfplotslibrary{...
0
votes
1answer
41 views

tikz register map

I whant to draw register description like in the picture, but my tikz knowlage is very poor. Any startups?
2
votes
2answers
26 views

TikZ: Incorrect arrow heads with edge node

Why is the left arrowhead wrong, and how can I fix it? \documentclass[border=5pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[auto] \draw[<->] (0,0) edge node {$...
2
votes
2answers
82 views

TIKZ Macro to draw hundredth of a square

I would like to use a macro to draw automaticly this if I specify the number 195. \begin{tikzpicture}[scale=0.25,baseline={([yshift=-.5ex]current bounding box.center)}] \foreach \i in {0,...,...
1
vote
2answers
62 views

Circle in place of black node in graph

Question: In my graph i want to draw small circles in place of black dots for every points a, b, c, d, e, f and g. further i want to label all these points inside circle. MWE: \documentclass[10pt]{...
4
votes
3answers
131 views

Tikz background color of node multilayer

I am trying to draw two nodes who are on a different layer. The background layer consists of the 'big' node and the foreground layer consist of the 'small' node. Only the big node can have a ...
1
vote
1answer
36 views

TikZ ! Missing number, treated as zero

Hi all, here is a (hopefully not oversimplified) MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\A{{3/(2*6)}} \def\B{{sqrt(5-\A)}} \filldraw (\A,\B) circle ...
0
votes
1answer
26 views

Adding an Under-brace Under a Label, `tikz`

I'd like to add add an (under)brace under the labels in the following diagram, indicating the part of the structure labeled "A" and "B", respectively. What I have makes the brace too close to the ...
2
votes
1answer
43 views

Slope fields are not symmetric using tikz

Using this code to try and plot the slope fields for xy' - y = 0 (which is y = cx) and there's a clear lack of symmetry on both sides. \documentclass{article} \usepackage{amsmath} \...
3
votes
2answers
39 views

TikZ (trees): How can I align children nodes in a tree on the same level

I try to align the children in a tree in a way, that all children are vertically aligned. That's the code I have so far. You can see my problem below the node "I'm a very very very long text". The ...
2
votes
1answer
48 views

Draw a Column of Nodes with a For Loop

I would like to draw a 'column' of nodes, something like the following (except I would want all the nodes to be the same dimensions). Which I created with the code: \documentclass{article} \...
0
votes
0answers
46 views

Trying to draw 4 lines plot

I need to get whats on the screenshot: This is the closest I could get: \documentclass{standalone} \usepackage{subcaption} \usepackage{caption} \usepackage{pgfplots, pgfplotstable} ...
2
votes
1answer
30 views

Unwanted white space on left side of Tikz Picture

I am trying to recreate this: This is what I have so far: You might not be able to tell from this image, but there is some white space to the left of the picture, and I'm not sure why. I was ...
0
votes
0answers
26 views

\markboth inside tikz \node text not working

If \markboth is used inside a tikz node text, this \markboth does nothing. Output of pdflatex, xelatex, and lualatex are the same. Does this work as expect? I noticed that an inside-group \markboth,...
0
votes
1answer
48 views

Nested steps in TikZ

I have a figure in a Beamer-presentation. I want to change the content of TikZ-boxes step-wise, and the box itself should also be a step. It sort of works, but I get an error-message. So I wonder how ...
2
votes
1answer
34 views

Rendering tikz graphics using Tikzit and MacOS

I wanted to try using "Tikzit" for MacOS to create some simple diagrams without too much hassle. Running the below code: \documentclass{article} \usepackage{tikzit} \usepackage{tikz} \input{mystyle....