Tag Info

8

The easy way out is to fake the derivative; \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document} \pgfmathdeclarefunction{MyF}{1}{% \pgfmathparse{% (and (1 , #1<=5)*(3.-0.5*#1-2.24667*#1^2+2.93766*#1^3-1.55322*#1^4+0.413019*#1^5-0.0534444*#1^6+0.00265741*#1^7)) +% (and (5<#1 , #1<7)*(4)) +% ...

7

Use /pgf/bar width=5pt,% bar width Additionally, I would add the options xmin=0,% minimum x value enlarge x limits={abs={1.5em},upper},% space for nodes near coords Code: \documentclass[margin=10pt]{standalone} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pgfplots,pgfplotstable} ...

6

Legend box is a TikZ matrix so matrix node options apply to it. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{tikzpicture}% \begin{axis}[legend style={minimum height=3cm,column sep=4cm}] \addplot {rand};\legend{label} \end{axis} \end{tikzpicture} \end{document}

5

You are overriding the style of the nodes so you need /.append style instead Modifying only these lines nodes near coords align={right}, every node near coord/.append style={font=\tiny, inner sep=1pt}, leads to

5

Your grouping is not correct and implicit multiplication is not implemented yet. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document}% \begin{tikzpicture} \begin{axis}[ axis lines = left, xlabel = Number of Elements, ylabel = {$\mathrm{Combinations}=\frac{(n)!}{(n-r)!(r!)}$}, ] %Axis \addplot [ domain=2:10, ...

5

I would shift the nodes on blue columns slightly to the left, and nodes on the red columns slightly to the right by using the every node near coord/.append style={xshift=<dim>} key together with the \addplot+ command (instead of \addplot). MWE \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \pgfplotsset{ base/.style={ ymin=0, ...

5

\documentclass[pstricks,border=15pt,12pt,dvipsnames]{standalone} \usepackage{pstricks-add} \psset { algebraic, linejoin=2, plotpoints=1000, xAxisLabel=$t$, yAxisLabel=$s(t)$, urx=15pt, ury=15pt, llx=-5pt, lly=-5pt, } \def\f{IfTE(x<0,-x^2,IfTE(x<2,x,IfTE(x<3,2*x+1,x^2/2)))} \begin{document} \pslegend[lt]{% ...

4

My answer to this question will also work if the legend entries are refering to different groupplots. First the plots are labeled. Then the legend for the labeled plots is placed outside of the groupplots, The current bounding box and two additional defined coordinates are used to position the legend. \documentclass[border=5mm]{standalone} ...

3

PGFPlots can calculate histograms. By using three axis environments positioned relative to each other, you can get the desired output: \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[ /pgfplots/scale only axis, /pgfplots/width=6cm, /pgfplots/height=6cm ] % The scatterplot \begin{axis}[ ...

3

You can label each plot and then set the legend as a tikz matrix outside the axis environment. The two related legendimages can be placed in the same matrix cell using \raisebox and \llap. \documentclass[tikz,border=5pt]{standalone} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{pgfplots} \usetikzlibrary{matrix} ...

2

clickable coords is the best available solution here - but it applies only if you hit the position where a plot mark would appear. If you miss that position, the popup will merely show the axis coordinate, i.e. it will be unrelated to the plot(s) as such. So, the short answer is: bar plots have only very limited support in the clickable library. More ...

2

The comment by Andrew is not sufficient, because log plot exponent style only affects the format of the exponent itself; it doesn't allow you to change the base at all. I'm not totally convinced that what you're asking for is a good idea. As you'll see below, you lose the immediate clue that you're looking at a logarithmic scale, and have to parse the ...

1

The y axis can be manipulated by: \pgfplotsset{/pgfplots/y filter/.code=\pgfmathparse{##1*1e-6}} The contour label can be manipulated by: \pgfplotsset{contour/label node code/.code={\node {\pgfkeys{/pgf/fpu=true,/pgf/number format/.cd,precision=2}\pgfmathmultiply{#1}{1e6}\pgfmathprintnumber{\pgfmathresult}};}} Note the addition of the /pgf/fpu=true in ...

1

pgfplots will plot functions by default, and the simplest case of a function is a constant value, as you have requested. Simply add \addplot[mark=none, black] {0.5}; (replace 0.5 with your constant value) and style to suit. The legend entry is added in the usual manner. The default domain for a plotted function is [-5,5], which will change the view of your ...

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