# Tag Info

1

In your example, the second and third axis environment has the same bar shift (=0pt), hence they overlaps. In the following example, I specify bar shift to -12pt, -4pt, 4pt, 12pt in turn for those four axis environments, and add a width=10cm to widen the whole figure. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \usetikzlibrary{...

1

\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=3] \draw[step=,gray,thick] (-1,-1) grid (4.5,4.5); \filldraw[ fill=red!40, draw=red!80!black,ultra thick, opacity=.5 ] (0,0) -- (4cm,0mm) arc [start angle=0, end angle=90, radius=4cm] -- cycle; \draw[->] (-1,0) ...

2

You can use ticklabel to specify what you want to use as label text of extra tick 0. Here I use upper case O as an example: extra x tick style={ xticklabel style={below left}, xticklabel={O} }, Full example: \documentclass[]{standalone} %%%%%%%%%%%%%%%%%% INPUT %%%%%%%%%%%%%%%%%% %\input{preamble.tex} %\input{parameters.tex} %%%%%%%%%%...

0

Round about line 1000 of the .pgf file, you have four instances where things are drawn at a coordinate of (1.004445in, -2250.839168in), I'm guessing 2250 inches is more than TeX can handle. Try commenting out everything from the \begin{pgfscope} at line 989 to the \end{pgfscope} at line 1060, and check if the output is as it should be. I get

1

I know it is late, but here is the link to the code that I used: Link to The GitHub Repository Follow the steps in readme.md in the repository. Note that this has been used as the template.

0

Finally I found the place to define the values: \addplot[fill=orange, thick] table[] {\jobname.csv} [above] node at (boxplot box cs: \boxplotvalue{median},1){Median \pgfmathprintnumber{\boxplotvalue{median}}\xdef\med{\boxplotvalue{median}}\xdef\uq{\boxplotvalue{upper quartile}}\xdef\lq{\boxplotvalue{lower quartile}}\xdef\uw{\boxplotvalue{upper whisker}}\...

3

It took me some time to hack the output routine. There are three command related to legend: \pgfplots@show@small@legendplots: draw the legend marker on the left side. \pgfplots@createlegend: output the legend matrix \pgfplots@create@axis@descriptions@: output axis description. \pgfplots@create@axis@descriptions@ invokes \pgfplots@createlegend, and \...

4

Sort answer: Give to Caesar what is Caesar's. LaTeX is not to manage huge amounts of data. Even if you can reduce the data in the LaTeX side, as you are using R, data reduction should be done in the R side. Not only could be faster, but also easier. Longer answer: On the other hand, R can also make plots even with huge amounts of data (if that could be ...

2

I found if you define the style via \tikzset and use it as the option for \pgfmathprintnumber the output will be correct. But I don't know why. To format the number format, you can also use package siunitx. \documentclass{article} \usepackage[margin=1cm]{geometry} \usepackage{pgfplots} \usepackage{siunitx} \pgfplotsset{compat=1.17,width=5cm,height=5cm} \...

2

This is probably a duplicate of one or more questions, but anyways. The coordinates of an axis environment is in general not the same as the underlying tikzpicture. To draw stuff in axis units, move the stuff inside the axis environment and either activate compat=1.11 or some higher version or prefix coordinates with axis cs. (i.e. (axis cs:0,0) instead of (...

2

Check the following code: \documentclass[border=0.1cm]{standalone} \usepackage{tikz} \usetikzlibrary{intersections,calc} \begin{document} \begin{tikzpicture}[thick,yscale=0.8] % Axes \draw[-latex,name path=xaxis] (-1,0) -- (12,0) node[above]{\large $x$}; \draw[-latex] (0,-2) -- (0,8)node[right]{\large $y$};; % Function plot \draw[ultra thick, ...

2

Possible reason: the content of nodes near coords is passed to nodes near coords*, and nodes near coords* is defined as /pgfplots/nodes near coords*/.style={% /pgfplots/scatter/true*,% /pgfplots/set point meta if empty=f(x),% scatter/@post marker code/.append code={% % ok, place the node. ...

0

I don't know if this is the type of plot that you are looking for, but anyway the file MWE.Rnw below should serve to get the idea of the alternative way to obtain your desired plot with knitr. MWE.Rnw \documentclass{article} \begin{document} <<myplot,dev='tikz', echo=F,warning=F, fig.height=3, fig.width=3>>= x <- c(3,9,4,2,5,6,2,6) plot(...

2

Just a proof of concept and not a complete answer with Tikz Seems simple to me --disect the PWM into rectangles of 0.2 unit width--height of 2 units--each rectangle would be having a coordinate --say 1,0--1,2--2,2--2,0--this could be replaced with --x,0--x,2--x+1,2--x+1,0--where x is a recurring number Similarly for the negative side pulse--x,0--x,-2--x+1,-2-...

1

Try the following: In the preamble of your document, make sure to have: \usepackage{tikz} \usepackage{pgfplots} \usepackage{pdflscape} \pgfplotsset{compat=newest} %% the following commands are needed for some matlab2tikz features \usetikzlibrary{plotmarks} \usetikzlibrary{arrows.meta} \usepgfplotslibrary{patchplots} \usepackage{grffile} \newlength\...

0

To achieve what you want you just need to add xtick=data to the axis options. To show more than two decimal places you need in addition to adapt the x tick label style. For details please have a look at the comments in the code. % used PGFPlots v1.17 \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{...

0

You can change the node style of coordinate index 0 by coordinate style/.condition={ {\coordindex==0}{ yshift=2mm, font=\scriptsize, /pgf/number format/.cd, fixed, precision=2, /tikz/.cd} }, Complete code \documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.17} ...

1

To get rid of the exponentials, add nodes near coords style={ /pgf/number format/fixed, % set style to fixed number of decimals /pgf/number format/precision=2, % two decimals font=\footnotesize % smaller font to avoid overlap }, You should also add ymin=0, to set the lower yaxis limit. \documentclass[border=5mm]{standalone} \...

1

xticklabels does work if done right. I don't know what you tried, but the following is one example. Regarding plotting the function, I again don't know what you did, but one thing to take into account with trigonometric functions is that they assume degrees as input, so if you have radians you need to convert to degrees e.g. with deg(..), or add trig format=...

0

I managed to find a solution with the help of someone over at freenode. This can be solved by calculating a logarithmic meta and then displaying the raw values instead of the transformed meta values. The problem with 0 is solved by adding 1. \begin{tikzpicture} \begin{axis}[ colormap={bluewhite}{color=(white) rgb255=(90,96,191)}, ...

2

You can modify the axis background style by scaling it and shifting it as follows: axis background/.style={fill=yellow,scale=1.2,shift={(-1cm,-1cm)}}

3

You can use yticklabels={\raisebox{-1cm}{$-0.5$}, $0.5$}

0

The same problem happened for me when I've set -output-dir parameter compiling with pdflatex. So, I have the following structure: . builds/ texs/ file_to_compile.tex I wanted to compile my .tex and put it to builds. Being in root I tried to execute this: pdflatex -shell-escape -output-dir=builds texs/file_to_compile.tex and got this weird ...

0

I use the amsmath package and use it like this (replace 25 and C with whatever you need): \$25^\text{o}C This is what it looks like: 25oC I think it looks a lot like a real degree symbol, and it's fairly simple.

1

The PGF manual states (p20 in version 2.10): The PSTricks package is certainly powerful enough to create any conceivable kind of graphic, but it is not portable at all. Most importantly, it does not work with pdftex nor with any other driver that produces anything but PostScript code. Compared to PGF, PSTricks has a broader support base. There are many ...

Top 50 recent answers are included