Linked Questions

2
votes
1answer
211 views

Loop in PGFPlot axis environment / Adding value above data points [duplicate]

I have two problems when trying to add the value of a data point above the data point. I am trying to solve this with a for-loop: \documentclass[12pt]{article} \usepackage{tikz} \usepackage{pgfplots} ...
3
votes
0answers
103 views

Problems using `\foreach`to parametrize a sequence of graphs in Beamer [duplicate]

I want to create a series of overlapping graphs in a Beamer slide, with little variations between them. I have code that works as expected in one case, but fails in other, and I don't understand why, ...
2
votes
0answers
48 views

Problem with curly brackets and \pgfmathsetmacro [duplicate]

I want to create a loop over an false-position algorithm But I have two problems with \pgfmathsetmacro. (1) The curly parentheses does not allow `\pgfmathsetmacro` to evaluate In the code below, my \...
9
votes
2answers
618 views

Plotting Arrows Programmatically in Pgfplots

I'm having an issue where I would like to plot a series of evenly spaced arrows where the length is dependent on the values from a data file and I'm not particularly sure how to go about it. I would ...
4
votes
2answers
426 views

Drawing Grid Lines using \foreach

I am trying to draw gridlines inside a square. Here is my code: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \begin{document} \begin{figure}[ht] \centering \begin{...
5
votes
2answers
168 views

Tikz - Coordinates error when using draw with axis

I am using the following code, which is supposed to cut a function in N parts : \documentclass[11pt]{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} ...
3
votes
1answer
865 views

TikZ - I do not know the key … despite correct code (can't define a new style anymore)

I just wanted to define a new style, a very very simple one with align left, text width=6cm but I found out even simpler code won't work. Basically I assume my installation is broken or I run the code ...
3
votes
1answer
470 views

Pgfplots axis environment, loop for function works but not for plotting options

My question is related to this one, \foreach not behaving in axis environment , but the solution there does not work in my case and unlike the related question, the loop works well in the axis ...
4
votes
1answer
763 views

define color in pgfplots

I want to plot funtions and data with own colors using \definecolor{<name>}{<model>}{<value(s)>}. If I use this command in \tikzpicture it works. But if I use this command in ...
2
votes
1answer
962 views

3D plot with pgfplots

I am trying to plot the function $U(x,y)=6*\ln(x) + \ln(y)$ for $x=1,...,4$ and $y=1,...,14-3*x$, however, I can't specify that the domain for $y$ is a function of $x$. MWE: \documentclass[tikz,...
3
votes
1answer
628 views

pgfplot addplot with predefined coordinates

I have a bunch of coordinates predefined, where I want to draw multiple lines in a plot by reusing coordinates. If I change a coordinate value, I only want to have to change it once, and not in ...
3
votes
1answer
290 views

pgfplots - Nodes on polar curve r=1+cos(x)

I want to draw circles as node on polar curve r=1+cos(x) with equal intervals. I can draw one node on curve, say for 30 degree, using parametric equation of curve using code below. \documentclass[...
3
votes
1answer
378 views

TikZ: groupplot with nested foreach loops to highlight background of profile

I'm trying to use \groupplots and \pgfplotsinvokeforeach to generate a dynamic picture showing different profiles. Within those profiles I'd like to highlight different ranges (sequences) with a ...
2
votes
1answer
274 views

Expanding macros in \pgfplotsinvokeforeach inside an axis environment

I am using \pgfplotsinvokeforeach with \pgfplotstablegetelem to extract certain data values from a table, which are then used to draw directly onto a pgfplots axis. The data extracted from any one row ...
0
votes
1answer
320 views

Use variables in addplot in axis environment

I wanted to make a macro \simplePlotWithFuncs creating plots both from .csv files and from given functions. I need it to be quite versatile, so I can set a lot of things. Because of limited number of ...

15 30 50 per page