Skip to main content

New answers tagged

3 votes
Accepted

pgfplots filled contour with precomputed contour line coordinates

Here is a rather manual solution: \begin{filecontents*}{contours.dat} 0.857143 2 0.6 1 1 0.6 2 0.857143 0.6 2.5 1 0.6 2.66667 2 0.6 0.571429 2 0.4 ...
hpekristiansen's user avatar
1 vote
Accepted

Center Tikz pictures used as tick labels in Pgfplots

You have several spaces in the piechart. I can not recommend doing this as it nest tikzpictures. It might be done with a path picture or simply drawn afterwards. \documentclass{article} \usepackage{...
hpekristiansen's user avatar
0 votes

TikZ-PGF surface edges smoothing

There is no automatic way to avoid that problem - the function is evaluated on a regular mesh. Here is one way to get a better result: \documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots}...
hpekristiansen's user avatar
5 votes
Accepted

PGFPlots library fillbetween causing a bunch of "Missing Character" warnings

This has been reported and fixed in the development version: https://github.com/pgf-tikz/pgfplots/issues/456 Basically you have to use \ifdim instead of \ifnum in an internal command: \documentclass[...
Ulrike Fischer's user avatar
3 votes
Accepted

Strange rendering of 3d surface with pgfplots

Changing what is a possible error in your equation gives the expected result (so it is not the exact same equation): \documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{...
hpekristiansen's user avatar
0 votes

Displaying table content within a pgfplot

\begin{filecontents*}{mytable.csv} index, xrayOn 0,0 11,11 22,22 33,33 \end{filecontents*} \documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{...
hpekristiansen's user avatar
1 vote

I cannot get Pgfplots to display all my axis labels

Thanks to @alchemist, here is the code that ended up displaying the labels that I needed on both axes: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{tikz} \...
ziadmbaroudi's user avatar
3 votes
Accepted

I cannot get Pgfplots to display all my axis labels

Seems to me the first and last ticks in both x and y axis are taken as the minimal resp maximal values of x / y when plotting the axes. So add the following lines to your code: xmin=153, xmax=197, ...
alchemist's user avatar
  • 1,846
1 vote
Accepted

groupplot: width and alignment

This uses three axis environment, using yshift and xshift to align them. Interestingly, putting a group plot into a savebox is not allowed (something about prevdepth). \documentclass[tikz, margin=5mm]...
John Kormylo's user avatar
  • 81.2k
1 vote

Combining `\addplot3` Commands with Separate Colors in PGFPlots

You have syntax errors in your colormap. There is a bug in PGFPlots when using z buffer=sort combined with a non-uniform colormap. \documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \...
hpekristiansen's user avatar
1 vote
Accepted

Surface of revolution around x-axis

Here is a simple Asymptote code (see this link for use 3D Asymptote figure inside LaTeX): // run on http://asymptote.ualberta.ca/ unitsize(1cm); size(8cm); import graph3; currentprojection=...
Black Mild's user avatar
  • 17.9k
1 vote

How do I draw a cone with a generatrix?

Since pgf doesn't actually do 3d, you either have to order things correctly (with opaque things on top) or clip the things which should be 'behind'. In this case, the circle makes a good path to clip ...
cfr's user avatar
  • 208k
1 vote

How do I draw a cone with a generatrix?

According to the comments, Tikz cannot handle 3D situations, so it is necessary to draw the figure in sections according to the perspective relationship. Thanks to cfr Here is my code: \documentclass[...
BqBPdx's user avatar
  • 39
4 votes
Accepted

pgfplots: Option "axis x line = bottom" ignored AFTER "axis x line = center"

The axis x line=bottom is not ignored, as you can see when you choose a non-zero ymin (I find it clearest to just plot some data; this also avoids cluttering the options with ones that are irrelevant ...
schtandard's user avatar
  • 15.4k
1 vote
Accepted

Plot only a small element of area of a surface with pgfplots

You might want to change your POV. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{width=10cm, compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=center,axis ...
John Kormylo's user avatar
  • 81.2k
1 vote

Making a node in TikZ occupy the vertical space of one line - at least as far as positioning a "pin" is concerned

You could use \phantom to make the node three lines and thereby match the exact vertical position as if it was only one line. Like this: \documentclass[tikz, border=1cm]{standalone} \begin{document} \...
hpekristiansen's user avatar
2 votes
Accepted

Making a node in TikZ occupy the vertical space of one line - at least as far as positioning a "pin" is concerned

Like this? \documentclass[border=120pt]{standalone} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{tikz} \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings,...
cfr's user avatar
  • 208k
2 votes
Accepted

How to apply two colors to a 3D plot based on x domain in PGFPlots?

The pgfplot documentation says: Use \closedcycle whenever you intend to fill the area under a plot. I have colored only one curve to keep the answer minimal. Edit: Instead of restrict x to domain=95:...
Terrarium's user avatar
  • 518
0 votes
Accepted

Plane doesn't overlap marks in pgfplots

Explanation Unfortunately, there is no algorithmic way to always ensure PGFPlots will render 3D graphs with the appropriate ordering of what objects appear above, and what objects appear below (called ...
gz839918's user avatar
  • 2,058
2 votes

Colormap along the line curve rather than the axes

I am not familiar pgfplot, but i can plot this gradient plot using l3draw. Fisrt, using the data you provided, see: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{l3draw} \begin{...
zpding's user avatar
  • 134
3 votes
Accepted

pgfplots "no ... in font nullfont" with `y filter`

The .log file contains (among other things) There is no ... in font nullfont! with successively 1.0e-1, 2.0e-1 and 6.0e-1. These originate from the usage of \pgfmathresult after the computation #1/10 ...
matexmatics's user avatar
  • 5,379

Top 50 recent answers are included