Tag Info

11

Not strange, consider where the function value is calculated, by setting mark = x: The default number of samples is 25, and 25 samples from -3 to 4 gives one sample at -0.0833 and the next at 0.20833. The asymmetry causes the problem you see. If you set the number of samples and the domain such that you get a sample exactly at zero, you should be fine. ...

6

This should give you a starting point. If you have any questions, consult the pdfplots user guide. \begin{filecontents*}{data.dat} Date, Ford, GM, Uber 2010 Q4 3, 60000, 50000, 1 2010 Q4 4, 70000, 57000, 1 2010 Q4 5, 60000, 55000, 1 2011 Q2 1, 55000, 47000, 1 2011 Q2 2, 56000, 45000, 1 2011 Q2 3, 58000, 45500, 1 2011 Q2 4, 56000, 44500, 1 2011 Q2 ...

5

I would guess that if you define the colours in the same way in both cases, they would match. Both xcolor and matplotlib allow you to use RGB tuples, with values in the range zero to one, to define colors, so you could probably say e.g. green = (0,1,0) plt.plot(x,y,color=green) in matplotlib, and \definecolor{green}{rgb}{0,1,0} \draw [green] (0,0) -- ...

4

The brachistochrone is an inverted cycloid. You can plot one in Metapost by imagining that you are rolling a wheel along the x-axis. Here is another cycloid diagram question. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); numeric u, r; u = 5mm; r = 4u; path xx, yy, A, B, C; xx = (left -- 8 right) scaled u; yy = (up -- 8 down) scaled u; ...

3

The plot is correct, in order to see the the origin include ymin=0, i.e.: \begin{tikzpicture} \begin{axis}[ title={\texttt{Vatten hastighet från kant till mitt}}, xlabel=$Meter från kant (m)$, ylabel={$v (m/s)$}, ymin=0, xmin=0, xmax=3 ] \addplot[color=red] {0.5 + 2*x/3 ...

3

The primary difficulty appears to be a weakness of the floating point unit in TeX -- it appears to be unable to handle the array syntax. Deactivating it by means of use fpu=false works. Note that you code contains no domain argument -- your x argument is sampled with the default domain -5:5. Adding both + some style changes (that I forgot to remove while ...

2

It is just as Jake commented. The * for multiplication was missing. \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{semilogxaxis}[xlabel=Frequency, ylabel=Gain, xmin=1, xmax=20000, ymin=0, ymax=2] \addplot[domain=1:1e4,color=red] {((2*pi*x)^2 + 10^6)/(11*(2*pi*x)^2 + 10^6 + 10^4)}; % ...

2

If I've understood what you want correctly, then you would like the following input \section{X} \myplotFF{file={example-image-a},Re=50,DOF=4M, statsName=Drag} to produce the following output The code as you currently have it is a mess. You seem to have multiple modules for one package/class/ and multiple sub-modules for handling the same options/data. ...

2

In a) I assume you meant the ticklabels. That modification can be achieved with xticklabel={\euro\pgfmathprintnumber\tick}, yticklabel={\euro\pgfmathprintnumber\tick}, To change the precision of the ticklabels, I added ticklabel style={/pgf/number format/.cd, fixed,precision=2,fixed zerofill, ...

2

Partial solution (I skipped the contour level plots to simplify, let that as an exercise for the braves): Using the three-way if (boolean)?(value if true):(value if false) and the special "number" NaN (not-a-number), and using the option unbounded coords=jump you can do the following: \addplot3 [surf, unbounded coords=jump] { (x-2)^2+(y-5)^2<9 ? ...

1

You can set a name path for the X axis (or the Y), so no need for an extra plot command. Also, removing the soft clip fixes the fill. Output Code \documentclass[margin=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=left, scaled ...

1

A quick example with groupplots. \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepgfplotslibrary{groupplots} \begin{document} \begin{tikzpicture} \begin{groupplot}[ group style={ group size=1 by 4, % sets number of columns and rows in groupplot array vertical sep=0pt, % vertical distance between axes }, ...

1

To make things only appear not immediately on a frame you can use \onslide<2-> What you want to appear\onslide<1->. Everything you write in between the two \onslide commands will only be visible on the second part of the frame. So in your example you want something like that: \begin{frame} \begin{tikzpicture} %Draw your graph(always ...

1

With Chrisitan's help and a lot of searching around I managed to get it working! The definition: \def\tvalues{{53,125,172,248,286,338,415}} % N_i^1(t), param 1: t, param 2: i \pgfmathdeclarefunction{bsplinebase}{2}{\pgfmathparse{and(#1>=\tvalues[#2], #1<\tvalues[#2+1])}} % N_i^k(t), param 1: t, param 2: i, param 3: k with k > 1 ...

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