Questions tagged [pgfplots]

51 questions
3
votes
1 answer

Get 'east' position of tikz legend

I would like get the 'east' (or 'south east') position (marked '*')of the legend of a named tikz axis plot (name = MyAxis) which has the following layout (legend is positioned right of MyAxis and the x-axis labels can have different…
2
votes
0 answers

Is there a way to display a pgfplots defined function as an equation?

I have in my preamble: \pgfplotsset{ compat=newest, /pgf/declare function={ g(\x) = -x^4+2*x^3-x-2; }, } and then later in the body I have a plot of the function g(x). I would like to be able to reference…
Ben Lewis
  • 21
  • 1
2
votes
1 answer

Latex pgfplots got an error of Dimension too large

I want to plot a graph with the format looking like this (with a line) but Latex only gives me this with an error of Dimension too large. This is my latex…
2
votes
1 answer

Latex pgfplots cannot show the line

I am trying to plot a graph like this in Latex: It turns out to be looking like this with out a line: This is my tex…
2
votes
1 answer

Conditional selection of tikz style classes

I try to achieve that different style classes are chosen in a self-defined tikz function depending on the input number. However, the \ifnum command doesn't seem to work as I expect it. The error message that I get is: >…
skam
  • 45
  • 3
2
votes
1 answer

Remove white space on right side of pgfplot

Currently I have the following figures (plots): I have placed the pgfplots inside two subfigures such that I can add the captions. The problem however is that some white space is added on the right side of Figure 3b. I am using the \hfill option…
2
votes
1 answer

Filtering/Indexing a semicolon sepeated csv file with floating point numbers

I want to filter and plot my data by two criteria. First I want to filter the data by column Test and then by Test No. and then plot it. Unfortunately, I am getting nowhere with the filtering. I tried it directly with the package pgfplots. After…
Kuba1623
  • 109
  • 6
2
votes
1 answer

Syntax for including the value of a declared variable inside a node in PGFPlots annotation?

In Julia, I have declared a variable, say, x = 3.5. Now I want to include this variable inside some annotation of a plot using PGFPlotsX. x = 3.5 using PGFPlotsX @pgf Axis( plot( Table( ), ), …
2
votes
1 answer

Plotting probability density function of normal distribution, but y goes above 1?

I'm trying to plot the probability density function of various normal distributions in latex. All have a mean of 0 and the standard deviations are: 0.4339, 0.4931 and 0.3665. I use this…
Cronos
  • 31
  • 2
2
votes
1 answer

Title left alignment with PGFPlots in Julia

I use PGFPlots.jl package in Julia to produce figures. I would like to have the title of figure being left aligned [instead of being centered by default]. Here is my MWE in Julia language: using PGFPlots p = Plots.Linear3(rand(10), rand(10),…
Chris
  • 93
  • 6
2
votes
0 answers

pgfplots width of plot

Consider the following example: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{subcaption} \usepgfplotslibrary{patchplots} \begin{document} \begin{figure} \begin{subfigure}{0.33\textwidth} \centering …
jonalv
  • 5,706
  • 9
  • 45
  • 64
1
vote
0 answers

Python (tikzplotlib) to LaTex: Package PGF Math Error: Could not parse input '--'

I am currently having some issues creating diagrams for LaTex using tikzplotlib in python. The string created with tikzplotlib contains characters that cannot be processed by latex. Here is a sample output from tikzplotlib: \addplot [draw=black,…
Hendrik
  • 11
  • 1
1
vote
0 answers

pgfplots not working with TexLive on Windows

\begin{tikzpicture} \begin{axis} \addplot[color=red]{exp(x)}; \end{axis} \end{tikzpicture} %Here ends the 2D plot \hskip 5pt %Here begins the 3D plot \begin{tikzpicture} \begin{axis} \addplot3[ surf, …
Gier
  • 11
  • 4
1
vote
0 answers

Improve quality in 3d plots with pgfplots package

I tried the following code \begin{axis}[ hide axis, colormap/cool, ] \addplot3[ surf, samples=101, domain=-1.1:0.5, ] {sqrt(x^2+x^3-y^2)}; \end{axis} \end{tikzpicture} But the quality I get is terrible:. It should look more like…
1
vote
0 answers

Latex tikzpicture space between data and frame

I have a problem with a graphic I created in Latex. If the graphic has few data entries, then everything looks great. The distance between the border and the first and last data point fits. Then it looks like this: However, the more entries the…
morzan1001
  • 73
  • 4
1
2 3 4