5
votes
1answer
55 views

pgfplots “Dimension too large” returned when plotting rational function

I've been using pgfplots for graphing for a while, now, and have recently run into a situation where I need to graph rational functions. Most of these have worked out fine, but one has caused me to ...
2
votes
0answers
68 views

tikz externalize and pgfmath error

Using external and \pgfmathdeclarefunction at the same time results in ! Illegal parameter number in definition of \pgfmathfloat@expression. ! Package PGF Math Error: Could not parse input '' as a ...
3
votes
1answer
149 views

\pgfplotstabletypeset heatmap: logarithmic scale

I am trying to create my own rendition of this heatmap. My values range anywhere from 1 to 783764. I want to plot them as colors on a logarithmically (base10) scaled colormap. So the values' ...
2
votes
0answers
32 views

How to scale both data and error bars in pgfplots

I am able to scale the data using the y filter option in pgfplots plot object (like here How to scale existing coordinates data in pgfplots?). However the error bars are not rescaled as expected. Is ...
3
votes
1answer
62 views

pgfplots: `nan` in `meta expr` causes “Missing number” error

I want to draw a table/matrix of color-values, where some of the values are missing. Despite having tried using unbounded coords=jump (see this answer), I get the following error: ! Missing number, ...
4
votes
1answer
101 views

pgfplot number format: scientific notation on ticks, without factor 1

I have a pgfplot that is supposed to give me only a colorbar, no other plot. My code was inspired by this question. The logarithmic colorbar code was recycled from this answer and this answer. The ...
6
votes
1answer
155 views

evaluate a string like `sin(x)+3` with `x` given

I defined a macro that gets as input a string like sin(x)+3, a starting x and an ending x, which is plotted using \addplot from PGFplots. Now I want to evaluate this function for x equal to the ...
7
votes
1answer
244 views

Using pgfmath declared function in pgfplots/tikz commands

The commented rows of the following code give me errors. It seems that functions declared with \pgfmathdeclarefunction do not work with tikz commands... \documentclass{standalone} ...
6
votes
1answer
142 views

When using decorations, how can I calculate with \pgfdecoratedpathlength?

I would like to draw a picture with tikz and use 'decorations' to show a single pulse on a line. Correct: A -- B As you may see my code won't work for more than one segment ( A--C--B ). ...
10
votes
1answer
402 views

How to scale existing coordinates data in pgfplots?

I have a plot with its data, for example \documentclass[]{article} \usepackage[]{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[] \addplot+[%multiply x data by a factor here, multiply y ...
4
votes
1answer
511 views

Plotting functions with parameters from an external file using gnuplot/pgfplots/pgfplotstable

If I have a table, how can I get the table values and use them as parameters for plotting in pgfplots in gnuplot? In particular, how can multiple curves be plotted with the same functional form from ...
6
votes
2answers
293 views

Plot x=3 in PGFPlots

I just started to use pgfplots and I'm trying to plot the line x=3 (a line parallel to the y axis where x is 3). I've tried to find an answer on the net, but all the examples always show how to ploy ...
9
votes
1answer
552 views

pgfplot: use pgfmathdeclarefunction defined function within coordinate

This code snippet defines a simple function using \pgfmathdeclarefunction (e.g. f()) and \pgfmathparse. I would like to use the defined function f() within other coordinate, e.g. (0.2, f(0.2)) vs. ...
8
votes
1answer
547 views

How to prevent small values from being plotted with nodes near coords?

I'm trying to finalize my first pgfplots chart. I've managed to get is almost the way I would like it to be with thanks to all examples I found here. The last thing I can't seem to figure out is how ...
11
votes
3answers
2k views

\pgfmathsetmacro - dimension too large (biggest value allowed?)

I want to import some data with parameters to parametrize some plots. After importing a table, I assign specific variables of the table to a placeholder by using \pgfplotstablegetelem. And it works ...
5
votes
1answer
651 views

How to enforce printing the decimal part in pgfmath macros?

I have the opposite problem to this question. I want the decimal parts of an integer printed for consistency's sake. I already tried specifying the precision but without success. See below. ...
2
votes
0answers
52 views

custom function in pgf doesn't behave consistently [duplicate]

Possible Duplicate: Is plotting exponential graphs a known source of bugs in TikZ? I want to use a custom function in pgf plots and in text, like in this example: ...
6
votes
1answer
1k views

pgfplot consistent number format

I am trying to make a the number format in my pgfplots the same, as in the rest of my document. I am normally using the \num from the siunitx package to typeset numbers, and would like to use it in my ...
10
votes
1answer
2k views

pgfplots and calculations; without fpu 'dimension too large', with fpu 'Illegal unit of measure (pt inserted)'

I'm trying to multiply some numbers that will end up in the legend of a plot. I can't get it to work: If I naively try \pgfmathmultiply, I get a dimension too large error, with the code in MWE 1 ...
4
votes
1answer
229 views

Change “<” to “<=” in pgfmath's and function

I am using this method for Defining a Piecewise Function for PGFplots and want to specifically define the function value at the endpoint to be 1, not 0. When I change the < in the and to <= I ...
8
votes
1answer
2k views

Using ifthenelse in pgfmath

Following questions on constructing functions on the forum, I tried to build some myself. I can't seem to get the ifthenelse function in TikZ/PGF to work. Here is an example: ...
4
votes
1answer
425 views

Pgfplots jump mark error when plotting a floor function

For some weird reason the following code gives me the wrong plot \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot+[jump mark left,samples ...