Hot answers tagged

3

If you want to change the fontsize of nodes inserted by an \addplot command you can use something like every axis plot/.append style = {font = \scriptsize} Code: \documentclass[margin=5pt]{standalone} \usepackage{pgfplots} \usepackage{amsmath} \pgfplotsset{compat=newest} \pgfplotsset{ tick label style = {font = \tiny}, label style = {font = \...


2

With \pgfplotsset{ errorBars/.style={ error bars/error bar style={ thick, }, error bars/y dir=both, error bars/y explicit, } } you can use \addplot[errorBars,style={red, fill=red}] or \addplot[style={red, fill=red},errorBars]. If all plots inside an axis environment should have error bars with this style, you can use every axis ...


2

Yes. You asked to surpess the warning. I am not sure if you really want to have this solution. \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{silence} \WarningFilter{ctable}{Transparency disabled:} \usepackage{pgfplots} \usepackage{ctable} \begin{document} Content here. \end{document} It only surpress the warning. A bugreport has been ...


2

I do not have your data file, so I will use a mathematical expression. You can use the color argument directly in the options of the plot. Then it would be possible to change not only the color but also e.g. the line style of a plot. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \newcommand{\plotvtf}[2][]{% \addplot+[ultra ...


2

You could use width = {ifthenelse(.9\linewidth>3in,3in,.9\linewidth)} Example: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ compat=1.13, every axis/.append style={ width = {ifthenelse(.9\linewidth>3in,3in,.9\linewidth)} } } \begin{document} \begin{tikzpicture} \begin{axis} \addplot{x}; \end{axis} \end{tikzpicture} \...


2

There are several reasons for using pgfplots rather than tikz, here are some that I could think of right now: Automatic scaling: pgfplots will scale things so that the plot doesn't become very large. Try plotting exp(x) for example, instead of sin(x). Automatic ticklabels and axis lines. This doesn't apply for your example of course, but often you want to ...


1

You just need to create the legend before \addplot adds the default line definition. (I renamed the graph file when I copied it. Sorry about that.) \documentclass{article} \usepackage{graphicx} \usepackage{epstopdf} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{loglogaxis} [ ...


1

I ended up taking Willie Wong's advice and used a domain of 2.02:15. It seems that since (-3)ln(x-2) is undefined for x=2 it doesn't try a different point that would display the graph appropriately.


1

You can define a new legend image style: \pgfplotsset{ /pgfplots/line legend with two nodes/.style 2 args={ legend image code/.code={ \draw[##1,no markers] plot coordinates { (0cm,0cm) (0.3cm,0cm) (0.6cm,0cm) } node[pos=0,#1]{} node[#2]{};% } } } Code: \documentclass[border=5pt]{...


1

A few (possible) problems with your code: By issuing domain=0:4 you are telling TikZ to plot between t = 0 and t = 4. It appears from your desired output you want to plot between approximately x = 0 and x=4. By issuing deg(30) you are not plotting cosine and sine of 30 degrees; instead you are plotting cosine and sine of 30 radians. (The deg function ...



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