# Tag Info

5

To get a parametric plot like the one you are linking to, you have to use the first function as the x component and the second function as the y component. (u_C(t), i(t)) With your function this results in plotting the function pair ({5+exp(-1266.77*x)*(-5*cos(deg(5508.55*x))+10.3*sin(deg(5508.55*x)))}, {exp(-1266.77*x)*(6.3*cos(deg(5508.55*x))+1.5*sin(...

4

You cannot have filecontents* in the argument of another command; this would result in an empty file being written out. After you move filecontents* outside of the definition, simply change #1 into ##1 in the code for trafo, so this would refer to the value given to the key. Example. \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \...

3

You can use 3dtools \documentclass[tikz,border=3mm]{standalone} \usetikzlibrary{calc,3dtools}% https://github.com/marmotghost/tikz-3dtools \begin{document} \begin{tikzpicture}[3d/install view={phi=30,theta=70,psi=0},declare function={r=2;h=5;}] \path[3d/record physical components] (1,0,0) coordinate (ez') (0,1,0) coordinate (ex') (0,0,1) coordinate (ey');...

3

Instead of discarding coordinates where you divide by zero, you can jump over them unbounded coords=jump. Also I guess that you want trig format plots=rad \documentclass[titlepage]{article} \usepackage[margin=1in]{geometry} \usepackage{amsmath} \usepackage{amssymb} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \usepackage{tikz} \usetikzlibrary{calc,...

3

If you define a macro, the idea is (I think) to reuse that. So, you should never load packages etc. in a macro --- and most of the settings could be done outside. Moreover, your macro does not use the argument at all. I interpreted your question like the following. I suppose you want to keep the y coord trafo inside the macro (although, unless it is ...

2

first you need to solve math problem: write cardioid formula ... knowing it, drawing your diagram is simple: \documentclass[tikz,border=3.141592]{standalone} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[> = Straight Barb] % axis \draw[->] (-0.5,0) node[left] {$x'$} -- (2.5,0) node[right] {$x$}; \draw[-&...

2

\documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=middle, xlabel=$x$,ylabel=$y$, zlabel={$z$}, xmin = 0, xmax=5, ymin=-2, ymax=2, zmin=-2, zmax=2] \addplot3[ surf, shader=flat, gray, samples=2, samples y=10, domain=0:4, y domain=0:2*pi, z buffer=sort, opacity=0.5, ]...

1

Apparently there is a bug in PGFPlots, when using nonuniform colormaps. The offsets are mapped to the interval 0-1000 starting with the first offset and ending with the last offset, so in your case: 0cm -> 0 2cm -> 400 5cm -> 1000 These numbers are the ones that are used to choose the colors. They differ very little from a uniform color map(0,500,...

1

You can sort the z buffer - z buffer=sort \documentclass{article} \usepackage{pgfplots} \pgfplotsset{ compat = newest, width = 10cm, % width height = 7cm, % height samples = 10, } \begin{document} \begin{tikzpicture} \begin{axis}[hide axis] % Hiperbole \addplot3 [ % Aparence ...

1

I think this is what you want!? -adjust the numbers to your liking: \documentclass[border=1cm]{standalone} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=center, grid=both, %scale only axis=true, ymin=0, xmin=0, xtick={0,2,4,6,8,10,12}, legend pos=outer north east, clip ...

1

Set a minimum value for the z-axis. \documentclass[12pt]{article} \usepackage{pgfplots} \usetikzlibrary{3d} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[view={135}{10},axis lines = middle, zmin=0] \addplot3[surf] (x,y,x^2+y^2+2); \end{axis} \end{tikzpicture} \end{document}

1

You're using the angle \pic wrong, it should be just the coordinate names, without the parentheses. I.e. \pic [draw,-, black, angle eccentricity=1.2,"$\theta$"] {angle = C--B--A}; I've also swapped the order there to get the angle in the first quadrant. You also need to set the compat version to 1.11 or higher (e.g. \pgfplotsset{compat=1.11}), ...

1

If I compile the example with TeX Live 2020 (downgrading to compat=1.17 that's not really relevant), I see in the log file This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020) (preloaded format=pdflatex 2021.3.22) 23 JAN 2022 15:25 entering extended mode \write18 enabled. %&-line parsing enabled. [...] runsystem(gnuplot "...

1

I will share my setup. (windows, TeXstudio, MiKTeX) (0) No spaces in the filename! Use stackq.tex (1) Using lualatex.exe -synctex=1 -interaction=nonstopmode -shell-escape %.tex (2) TestExternalize.tex in the working directory EXTERNALIZE with a subdirectory FIGURES %%% File TestExternalize.tex \documentclass{article} % pgfplots \usepackage{pgfplots} \...

1

As you don't have multiple categories of data you shouldn't use scatter/classes with three separate classes. You'll get one "legend image" for each class, so the first two legend entries correspond to those two. As you can see the first symbol in the legend is a blue square, the second is a red triangle, corresponding to the scatter classes a and b....

1

You can use conditional formatting. As there is no text=none (like draw=none or fill=none), I use opacity=0. \documentclass[border=5pt]{standalone} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{filecontents*}{data} index;ytl;ms 1;$<1.0$\,ms;4.2 2;$1.1-100.9$\,ms;83.8 3;$101.0-200.8$\,ms;6.9 4;$200.9-300.7$\,ms;1.7 ...

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