# Tag Info

## Hot answers tagged pgfplots

7

In polar coordinates, like in cartesian coordinates, the components given in u and v are added to the coordinate of the point. So if you plot u=10, v=0, you get arrows that end 10° clockwise from where they start, at the same distance from the centre as the starting point: If you plot u=0, v=0.1, you get arrows pointing outward from the centre (because ...

7

You can do the math first: your equation is equivalent to x^2 - x = 1/x^i. So, on the same axis, draw the graph of y = x^2 -x and y = 1/x^i for some values of i, for example, i = 1,10,50,200. The x-coordinates of the intersections are the largest roots of the orginal equation (You should be able to prove this). \documentclass{beamer} \usepackage{pgfplots} \...

4

Another solution. This one uses a tcolorbox for including images with shadows (like in your example), tikzlibrary tikzmark for references inside the text and tikzlibrary calc for placement inside images. \documentclass[twocolumn]{article} \usepackage[most]{tcolorbox} \usepackage{lipsum} \usetikzlibrary{tikzmark,calc} \begin{document} \tikzmark{A} \lipsum[...

4

You can use a simple node to include the page as an image. \documentclass{article} \usepackage{tikz} \usepackage{kantlipsum} % For dummy text \begin{document} \begin{tabular}{cp{7cm}} \begin{tikzpicture}[baseline={(current bounding box.north)}] \node[draw,rounded corners,inner sep=0]{\includegraphics[width=4cm,page=156]{pgfmanual}}; \end{tikzpicture} &...

3

Add xticklabel style = {fill=white}and set layers = axis on topto your axis : \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \pgfplotsset{ standard/.style={ axis x line=middle, axis y line=left, fill = blue } } \begin{tikzpicture}[] \begin{axis}[standard, domain=0:2,...

3

To be able to distinguish the legend drawing you can use the legend image post style which appends additional options to only the legend but not to the plot itself. And if only marks is given to a plot you can override it back via sharp plot. For the error bar notation you can use the | arrow head. Hence you can just add the following to your axis options ...

3

The reason, as you guessed, is that you set the maximum value for your y as 7000000, that's 7 million. But your e value is 41930786, so 41 million, at least. So yes, it's out of range. If you want to have the current configuration and still have e to appear, even though it gets cut, then you can restrict the domain. Output Code \documentclass[margin=...

2

I do not have your data, so I just made up some numbers which is nowhere near what you have, but it illustrates the point. This answers is stolen from Dr. Manuel Kuehner's pgfplots, plot options ignored when using “restrict expr to domain”. Output Code \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \usepackage{filecontents} \begin{...

2

Here is a MWE \begin{filecontents*}{data.dat} date, temperature 2015-12-21 00:00, 17.54 2015-12-21 00:59, 17.23 2015-12-21 01:58, 16.96 2015-12-21 02:57, 16.88 2015-12-21 03:56, 16.70 2015-12-21 04:55, 16.36 2015-12-21 05:54, 17.02 2015-12-21 06:53, 19.24 2015-12-21 07:52, 20.40 2015-12-21 08:51, 22.06 \end{filecontents*} \documentclass[margin=5pt]{...

2

To fill the background of the ticklabels you can use ticklabel style={fill=white}. But the are drawn before the plots ... To change this order you can define and use a new layer set. \pgfplotsset{ standard/.style={ axis x line=middle, axis y line=left, ticklabel style={fill=white}, set layers=tick labels on top% use ...

2

The colors, markers and line styles used by pgfplots are defined in so called cycle lists. There are several such defined already, see the pgfplots manual section 4.7.7 Cycle Lists – Options Controlling Line Styles. If none of the existing ones are satisfactory, you can define your own cycle lists, see my answer to pgfplots adding unwanted dashed lines for ...

2

You can use the parametric equations in the regular syntax \documentclass{article} \usepackage{pgfplotstable} \pgfplotsset{compat=1.13,colormap/viridis} \begin{document} \begin{tikzpicture} \begin{axis}[trig format=rad,view={40}{45}] \addplot3+[no marks,mesh,domain=-pi/2:pi/2,y domain=0:2*pi,samples=61,samples y=61] ({cos(x)*cos(y)},{cos(...

1

This solution assumes that the sa file is tab separated. \documentclass[margin=0.3cm]{standalone} \usepackage{tikz} \usepackage{datatool} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} \pgfplotsset{compat=1.13} \pgfplotsset{ytick style={draw=none}} \def\axisdefaultwidth{9cm} \def\axisdefaultheight{6cm} \pgfplotsset{every axis/.style={scale only axis}} ...

1

Is this what you want? \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture}[scale=2] \begin{axis} \addplot+[only marks] file[x index=0, y index=1]{baba.txt}; \end{axis} \end{tikzpicture} \end{document}

1

Here is the same answer as Rmano's one, but in Lualatex with everything in the same file: \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \usepackage{pgf} \usepackage{luacode} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[xlabel=p1, ylabel=p1t, zlabel=p2t, tick style={draw=none}, xmin=-300, ...

1

Indeed, version 1.13 (the one I'm using, I don't know if the same holds for previous releases) provides the command \addlegendentryexpanded[<opt>]{<arg>}. The code therefore becomes: \foreach \tool in \tools { \addplot table[x expr=\coordindex, y={\tool}] {file.dat}; \addlegendentryexpanded{\tool} } See section 4.9.4 of the pgfplots ...

Only top voted, non community-wiki answers of a minimum length are eligible