Tag Info

22

Here is a largely guessed starting point \documentclass[tikz,margin=3mm]{standalone} \usepackage{pgfplots} \pgfplotsset{ compat=1.16, drawline/.style={-,black}, drawarrows/.style={ stealth-, blue!50!green, point meta=rawx, quiver={ u=-x, v=-y, every arrow/.append style={ ...

11

I propose the following, based on nodes near coords and scatter/@pre marker code: \documentclass[tikz, border=2mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \begin{document} \begin{tikzpicture} \begin{axis}[ declare function={f(\x) = 0.35*\x + 1;}, axis lines=middle, xlabel={$x$}, ylabel={$y$}, x label style={anchor=west, inner ...

10

This uses plain TikZ with intersections library for the intersection point. Note that scope environment can be nested, several \clips are used for filling. If you want the rectangle with more rounded corners, then simply use [rounded corners=3mm] e.g., in the definition of \bb. I believe that pgfplots also can be easily drawn this, with suitable options in ...

10

pgfplots uses undocumented internal TikZ commands, which have recently changed. I was promised a fix by the maintainer but so far nothing is forthcoming. https://sourceforge.net/p/pgfplots/bugs/232/ \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \makeatletter \def\pgfplots@install@path@replacements{% \ifpgfplots@path@replace@...

9

Please have a look and see if it meets the requirement \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,positioning,angles,arrows.meta,quotes,intersections} \usetikzlibrary{through} \begin{document} \begin{tikzpicture}[declare function={alpha=60; beta=75; sigma=110;}] \path (0,0) coordinate (A)node[below]{A} -- ++ (alpha:7cm) ...

8

Quick solution: % make sure dateplot lib is loaded first \usepgfplotslibrary{dateplot} % redefine pgfcalendar internals \makeatletter % defined in file pgfcalendar.code.tex \def\pgfcalendarmonthshortname#1{% \pgfutil@translate{\ifcase#1\or Jan\or Feb\or Mar\or Apr\or % here I have changed "May" to "Mei" as an example Mei\or Jun\or Jul\or Aug\or ...

8

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, ...

8

What I get is an error, actually. When plotting a function of x you should do \addplot {<function>}; or \addplot [<option>] {<function>}; if you're adding any options to the plot. You have done just \addplot [...] <function>; without the {}. In addition, note that multiplication has to be specified explicitly with *, so you need \...

8

I assume that c, alpha and beta are given; then: New simpler answer: \documentclass[margin=5pt, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{intersections} \usetikzlibrary{backgrounds} \usetikzlibrary{patterns} \usetikzlibrary{positioning} \usetikzlibrary{angles, quotes, babel} \usepackage{amsmath, amssymb} \begin{document} % ...

8

The axis is not square, so they shouldn't be perpendicular. Either set the width and height to the same value in the axis options, or try adding axis equal, which will make the unit vectors in x and y have the same length.

7

Your program is quite well written, so only minor improvements are possible. For example: collecting all style option in nodes' style definition defining common style for braces (you may liked fancy version defined in the calligraphy library) common option for plot move to axes options not repeating default settings. For example, scale=1 is superfluous, etc ...

7

For starting point I use Dr. Manuel Kuehner' answer (since it use simpler diagram). With help of the fit TikZ library: \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{fit} \pgfplotsset{compat=1.16} \begin{document} \begin{tikzpicture} \begin{axis}[name=PLOT, width = 80mm, height= 60mm, xmin = -1.2, xmax = 2.2, ymin = -...

7

Add \coordinate (a) at (2,\pgfkeysvalueof{/pgfplots/ymax}); in the first axis environment and \coordinate (b) at (2,\pgfkeysvalueof{/pgfplots/ymin}); in the second. Then after the last \end{scope}, add \draw [dashed] (a) -- (b);. As a sidenote, you might be interested in the groupplots library for aligned axes like this. \documentclass[12pt,a4paper]{...

7

This has room for improvements, but as a quick hack. The code has comments where I changed things, ask if there is anything that requires further explanation. \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=center, grid={both}, % changed clip=...

7

There is some jaggedness to the graph when I run it through the computer algebra system (CAS) called SAGE, so you should expect some in pgfplots To increase the precision of the result you can have SAGE generate the x and y coordinates or you can do them yourself. I used the command xcoords = [i for i in srange(-2,2,.06)] but you could just have easily ...

7

With pgfplots and pgfplotstable: %\documentclass[]{article} \documentclass[margin=5pt, varwidth]{standalone} \usepackage{amsmath} \usepackage{pgfplots} \usepackage{pgfplotstable} \pgfplotsset{compat=newest} \begin{document} % Input 1/2 ===== \newcommand\fxshow{e^{0.9x}-x^2} \pgfmathsetlengthmacro\mywidth{8.9cm} \tikzset{trig format=rad, declare function={...

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