pgfplots
- tikz pgfplot fill area between multiple graphs or pathsby paul_schaefer on August 27, 2026 at 12:22 pm
MWE: \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{lmodern} \usepackage[ngerman]{babel} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{tikz} \usetikzlibrary{arrows.meta} \usetikzlibrary{datavisualization.formats.functions} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture}[scale=1] \begin{axis}[ axis equal, % axis line style=thick, axis x line=center, ylabel={$y$}, xlabel={$x$}, major tick style = {black}, axis y line=middle, every axis y label/.style={ at={(current axis.above origin)}, inner sep=3, anchor=north east, }, every axis x label/.style={ at={(current axis.right of origin)}, inner sep=3, anchor=north east, }, xtick={-1,1}, xticklabels={$-\frac{w}{2}$,$\frac{w}{2}$}, ytick={1}, yticklabels={$h$}, yticklabel style={anchor=south west}, xmin=-1.75, xmax=3.25, ymin=-0.1, ymax=1.5, height=4cm, samples=100] \addplot[domain=-1:1,thick, name path=A] {1 - x * x}; \addplot[domain=0.5:2.5,thick, name path=B] {1 - (x-1.5) * (x-1.5)}; \draw[name path=C, thin] (1/3,8/9) -- (1.5,1); \path [name path=D] (\pgfkeysvalueof{/pgfplots/xmin},0) -- (\pgfkeysvalueof{/pgfplots/xmax},0); \addplot[black!15] fill between[of=C and A, soft clip={domain=0:0.75}]; \addplot[black!15] fill between[of=C and B, soft clip={domain=0.75:1.5}]; \addplot[black!40] fill between[of=B and D, soft clip={domain=0.5:0.75}]; \addplot[black!40] fill between[of=A and D, soft clip={domain=0.75:1}]; \end{axis} \end{tikzpicture} \end{document} results in a graph, where the areas between the both graphs are filled in gray. In this example I splitted the areas into four sections and colored them. Is there a possibility to fill the areas without splitting them into sections? A second problem is, that the separation of each area into two parts will sometimes result in in slight white vertical line between the colored areas. In my case it depends on the scaling of the pdf viewer I use. If there area could be described without separation this should not happen.
- How to draw highly accurate, continuous pH titration curves with the tangent method in TikZ/pgfplots?by Natsu on August 15, 2026 at 5:28 pm
When attempting to plot pH-metric titration curves for weak/polyprotic acids and bases using piecewise Henderson-Hasselbalch approximations, sharp breaks and discontinuous artifacts often appear near equivalence points. Is there a robust, automated way in TikZ and pgfplots to plot continuous curves using exact charge and mass balance equations, while also supporting geometric constructions such as the tangent method (méthode des tangentes)?
- How to reproduce the correct intersection curve of two 3D surfaces using PGFPlots?by Samia Rani on August 10, 2026 at 10:50 am
I am trying to reproduce a 3D figure from a mathematics book in LaTeX using TikZ/PGFPlots. The figure shows two surfaces and their intersection. The two surfaces are given by x^2 + xy - y - 3z = 0 and 2x^2 + 3xy - 2y - 3z = 0. I plotted both surfaces directly from their equations and also added their intersection curve. However, the shape and especially the intersection curve in my output look quite different from the figure in the book, even though I am using the same equations. I am not sure whether the difference is caused by the viewing angle, the plotting ranges, the parametrization of the intersection curve, or something else. Here is my current code: \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ view={120}{25}, axis lines=none, xmin=-2.5, xmax=2.5, ymin=-2.5, ymax=2.5, zmin=-5, zmax=5, width=11cm, height=8cm, ticks=none, ] %================================================ % GREEN SURFACE % 2x^2 + 3xy - 2y - 3z = 0 %================================================ \addplot3[ surf, shader=interp, colormap={greenmap}{ color(0cm)=(green!15); color(1cm)=(green!35) }, colormap name=greenmap, domain=-2:2, y domain=-2:2, samples=35, samples y=35, opacity=0.65, ] { (2*x^2 + 3*x*y - 2*y)/3 }; %================================================ % BLUE SURFACE % x^2 + xy - y - 3z = 0 %================================================ \addplot3[ surf, shader=interp, colormap={bluemap}{ color(0cm)=(blue!15); color(1cm)=(blue!35) }, colormap name=bluemap, domain=-2.2:2.2, y domain=-2.2:2.2, samples=30, samples y=30, opacity=0.55, ] { (x^2 + x*y - y)/3 }; %================================================ % INTERSECTION CURVE % gamma(t) = % ( t, -t^2/(2t-1), t^3/(3(2t-1)) ) %================================================ \addplot3[ very thick, red, samples=100, domain=-2.2:0.35, variable=\t, ] ( {\t}, {-\t^2/(2*\t-1)}, {\t^3/(3*(2*\t-1))} ); \addplot3[ very thick, red, samples=50, domain=0.65:2.2, variable=\t, ] ( {\t}, {-\t^2/(2*\t-1)}, {\t^3/(3*(2*\t-1))} ); \end{axis} \end{tikzpicture} \end{document} The book's figure has a noticeably different orientation and shape for the two surfaces and their intersection. The book's figure looks like this: My current output looks like this: Could someone please explain what is causing this difference and how I can modify my PGFPlots code to obtain a figure that looks like the one in the book? In particular, I would like to know whether I should change the view angles, the plotting domains, or the parametrization of the intersection curve.
- How can I draw the plane and intersection curve on a one-sheet hyperboloid in TikZ?by Samia Rani on August 9, 2026 at 5:23 pm
I am trying to recreate the following mathematical figure in LaTeX/TikZ. The figure shows the one-sheet hyperboloid x^2 + y^2 - z^2 = 1 together with the plane 2x + z = 1. Their intersection is the red curve shown on the hyperboloid. After quite a lot of effort, I have managed to draw the one-sheet hyperboloid reasonably well in TikZ. However, I am having difficulty with the two remaining parts: How can I draw the transparent red plane 2x + z = 1 behind/in front of the hyperboloid, as shown in the reference image? How can I draw the red intersection curve between the plane and the hyperboloid so that it lies correctly on the surface? I would like the final figure to look as close as possible to the reference image, including the perspective, transparency of the plane, and the red intersection curve. Here is the code I currently have for the hyperboloid: \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \usepackage{tikz} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture}[>=stealth] \begin{axis}[ view={120}{22}, axis lines=none, xmin=-3.3, xmax=3.3, ymin=-3.3, ymax=3.3, zmin=-2.0, zmax=2.0, xtick=\empty, ytick=\empty, ztick=\empty, clip=false, ] %------------------------------------------------ % Red point at the origin %------------------------------------------------ \addplot3[ only marks, mark=*, mark size=2.5pt, draw=red, fill=red, ] coordinates {(0,0,0)}; %------------------------------------------------ % Smooth one-sheet hyperboloid %------------------------------------------------ \addplot3[ surf, shader=interp, draw=blue!55!black, opacity=0.65, samples=45, samples y=80, domain=-2.2:2.2, y domain=0:360, z buffer=sort, ] ( {sqrt(1+x^2)*cos(y)}, {sqrt(1+x^2)*sin(y)}, {x} ); %------------------------------------------------ % POSITIVE x-axis %------------------------------------------------ \draw[ ->, black, thick ] (axis cs:0,0,0) -- (axis cs:5.0,0,0) node[right] {$x$}; %------------------------------------------------ % NEGATIVE x-axis -- dashed %------------------------------------------------ \draw[ dashed, black, thick ] (axis cs:0,0,0) -- (axis cs:-2.0,0,0); %------------------------------------------------ % POSITIVE y-axis %------------------------------------------------ \draw[ ->, black, thick ] (axis cs:0,0,0) -- (axis cs:0,4.0,0) node[above left] {$y$}; %------------------------------------------------ % NEGATIVE y-axis -- dashed %------------------------------------------------ \draw[ dashed, black, thick ] (axis cs:0,0,0) -- (axis cs:0,-1.0,0); %------------------------------------------------ % POSITIVE z-axis %------------------------------------------------ \draw[ ->, black, thick ] (axis cs:0,0,0) -- (axis cs:0,0,3.0) node[above] {$z$}; %------------------------------------------------ % NEGATIVE z-axis -- dashed %------------------------------------------------ \draw[ dashed, black, thick ] (axis cs:0,0,0) -- (axis cs:0,0,-2.0); %------------------------------------------------ % Origin %------------------------------------------------ \node[ below right, inner sep=1pt ] at (axis cs:0,0,0) {$0$}; %------------------------------------------------ % Equation %------------------------------------------------ \node[ blue!75!black, font=\large ] at (axis cs:2.0,-0.5,1.1) {$x^2+y^2-z^2=1$}; \end{axis} \end{tikzpicture} \end{document} I would be very grateful for any suggestions on how to add the plane and, especially, the intersection curve correctly. Thank you!
- How to easily draw and parameterize various pH titration curves (including diprotic/dibasic) for a beginner?by user446526 on August 6, 2026 at 8:23 am
I am a complete beginner when it comes to drawing complex functional plots in LaTeX. I am trying to create several types of pH titration curves for a document, but I am struggling to write the code from scratch. I found a very helpful French website that seems to have the exact mathematical logic and LaTeX code for what I need: https://www.astrolabe-science.fr/courbes-titrages-acido-basiques-latex/ However, as a beginner, I find it quite difficult to extract just the essential parts to create a simple, easily editable template. I need to recreate the following types of curves (I have attached images of what I am aiming for): The 4 basic monoprotic titrations: Strong Acid, Strong Base, Weak Acid, and Weak Base. Diprotic acid titration: A curve with two equivalence points (increasing pH). Dibase titration: A curve with two equivalence points (decreasing pH). My request: Could someone help provide a simplified, beginner-friendly pgfplots (or TikZ) template based on the math from that website? Ideally, I am looking for a code structure where the main parameters (like initial concentrations, volumes, and pK_a values) are defined at the top so I can easily change them. It would be incredibly helpful if you could include brief comments/instructions inside the code explaining how to switch between the different types of curves (e.g., "change this sign for a base", "uncomment this for a diprotic acid"). Thank you so much for your time and help! I have attached images of what I am aiming for.
- PGFplot ybar stacked with meta databy Paul on July 16, 2026 at 4:11 pm
I want to use ybar stacked to plot data for multiple series. I first tried to organise my data.dat file like that : { config; value1; value2; value3 config1; 3; 4.2; 1 config2; 3.25; 6; 0.758 } with for each row the series symbolic name and all the values. I then used a for loop to plot each column. This worked fine and all the data were stacked correctly. But I also need for each data point to have specific label and color meta data like in my MWE : \documentclass[class=article, crop=true,varwidth=false]{standalone} \usepackage{tikz,pgfplots} \pgfplotsset{compat=1.18,width=15cm,height = 5.5cm} \begin{document} \begin{tikzpicture} \begin{axis}[ axis y line* = left,axis x line* = bottom, ybar stacked, table/col sep=semicolon, symbolic x coords={config1,config2}, xtick = data, ] \addplot+[nodes near coords,point meta=explicit symbolic,] table [trim cells=true,y expr=\thisrow{value}, x=config,meta = label ] { config; value; type; label config1; 3; L; $W_{L1}$ config1; 4.2; C; $W_{C1}$ config1; 1; L; $W_{L2}$ config2; 3.25; L; $W_{L1}$ config2; 6; C; $W_{C1}$ config2; 0.758; L; $W_{C2}$ }; \end{axis} \end{tikzpicture} \end{document} This is compiling but data are not stacked. PGFplog interprets each row as a new serie and plot the bar from 0. What would be the easiest way to plot the stacked bar with meta data for each point ? Thank for your help !
- pgfplots speed up compilation (filtered rows)by Mathieu on December 4, 2024 at 2:36 pm
I have a csv file with approx 2000 rows and filter 100 rows of the data. However, the compilation time is already approx five seconds. When we filter rows (see below) are there some pertinent settings to speed up the compilation? I already use standalone tikz to only have to compile once, still, I feel there is room for improvement. \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepackage{pgfplotstable} \usepackage{xstring} \begin{document} \begin{tikzpicture} %Load csv file \pgfplotstableread[col sep=comma, header=true]{data.csv}\data % Plot the rows where the first column contains Exp18 \begin{axis}[] \addplot[table/x index={1}, table/y index={2}, x filter/.code={ \pgfplotstablegetelem{\coordindex}{Experiment}\of{\data} \IfStrEq{\pgfplotsretval}{Exp18} {} {\def\pgfmathresult{}} }] table {\data}; \end{axis} \end{tikzpicture} \end{document} Here is the file content of data.csv. (I had to delete some rows to input less than 30000 characters.) # Exp1, Some meta info..., # Exp2, ..., # Exp3, ..., # Exp4, ..., # Exp5, ..., # Exp6, ..., # Exp7, ..., # Exp8, ..., # Exp9, ..., # Exp10, ..., # Exp11, ..., # Exp12, ..., # Exp13, ..., # Exp14, ..., # Exp15, ..., # Exp16, ..., # Exp17, ..., # Exp18, ..., Experiment,X,Y Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp1,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp5,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp6,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp7,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp8,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp9,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp10,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp11,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp12,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp13,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp14,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp15,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp16,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp17,nan,nan Exp18,nan,nan Exp18,nan,nan Exp18,1.758,0.1279 Exp18,2.7777,0.1718 Exp18,3.7679,0.212 Exp18,4.7874,0.2447 Exp18,5.8074,0.2752 Exp18,6.8276,0.2997 Exp18,7.8479,0.3194 Exp18,8.8679,0.3362 Exp18,9.8874,0.3562 Exp18,10.9074,0.3726 Exp18,11.8975,0.3856 Exp18,12.918,0.4001 Exp18,13.9378,0.4135 Exp18,14.9578,0.4284 Exp18,15.9773,0.4392 Exp18,16.9974,0.4492 Exp18,18.0179,0.4578 Exp18,19.0378,0.4685 Exp18,20.0276,0.4834 Exp18,21.0478,0.4923 Exp18,22.0674,0.5009 Exp18,23.0875,0.5102 Exp18,24.1079,0.521 Exp18,25.1276,0.5325 Exp18,26.1479,0.5425 Exp18,27.1377,0.5478 Exp18,28.1574,0.5582 Exp18,29.1775,0.569 Exp18,30.2278,0.579 Exp18,31.2479,0.589 Exp18,32.2672,0.5961 Exp18,33.2874,0.6032 Exp18,34.3079,0.6113 Exp18,35.298,0.6236 Exp18,36.3177,0.6314 Exp18,37.3377,0.6389 Exp18,38.3573,0.6452 Exp18,39.3776,0.6549 Exp18,40.3981,0.6668 Exp18,41.4176,0.6753 Exp18,42.408,0.6809 Exp18,43.4274,0.6894 Exp18,44.4474,0.7017 Exp18,45.4675,0.7117 Exp18,46.488,0.7184 Exp18,47.5079,0.727 Exp18,48.5275,0.7352 Exp18,49.5473,0.7456 Exp18,50.5374,0.7556 Exp18,51.5579,0.7642 Exp18,52.5778,0.772 Exp18,53.5981,0.7846 Exp18,54.6173,0.7958 Exp18,55.6373,0.8051 Exp18,56.6578,0.8125 Exp18,57.6781,0.8214 Exp18,58.6678,0.8356 Exp18,59.6879,0.8467 Exp18,60.7072,0.8549 Exp18,61.7275,0.8623 Exp18,62.7479,0.8724 Exp18,63.7676,0.8861 Exp18,64.7878,0.898 Exp18,65.7776,0.9059 Exp18,66.7974,0.9159 Exp18,67.8175,0.93 Exp18,68.8381,0.9427 Exp18,69.8576,0.9531 Exp18,70.8778,0.9627 Exp18,71.8974,0.9724 Exp18,72.9175,0.9843 Exp18,73.9076,0.9988 Exp18,74.928,1.0089 Exp18,75.9479,1.0185 Exp18,76.9676,1.0319 Exp18,77.9872,1.0464 Exp18,79.0074,1.0591 Exp18,80.0281,1.0717 Exp18,81.0179,1.0821 Exp18,82.0378,1.0974 Exp18,83.0571,1.1122 Exp18,84.0774,1.1253 Exp18,85.0978,1.1364 Exp18,86.1179,1.1502 Exp18,87.1379,1.1658 Exp18,88.1575,1.1833 Exp18,89.1472,1.1933 Exp18,90.1675,1.2074 Exp18,91.188,1.2245 Exp18,92.2077,1.2416 Exp18,93.2279,1.2595 Exp18,94.2472,1.2733 Exp18,95.2675,1.2889 Exp18,96.2881,1.3056 Exp18,97.2781,1.3249 Exp18,98.2974,1.3413 Exp18,99.3177,1.3569 Exp18,100,1.3551
- Graphing simple 3d axisby sukmudmaisus on March 31, 2024 at 11:06 am
How to draw 3d axis with component like this.
- Pgf cone drawingby Paul A on November 12, 2023 at 7:23 pm
I used the following code, below which is altered from https://latexdraw.com/draw-a-plane-intersecting-a-cone-in-latex/ \documentclass{standalone} \usepackage{pgfplots} \usepgfplotslibrary{colormaps} \pgfplotsset{compat = newest} \begin{document} %Draw axis x, y and z, with grid on each plane of the axis \begin{tikzpicture} \begin{axis}[ axis equal image, grid = both, minor tick num = 2, xlabel = {$x$}, ylabel = {$y$}, zlabel = {$z$}, major grid style = {draw = lightgray}, minor grid style = {draw = lightgray!25}, legend cell align={left}, xmin = -1, xmax = 1, ymin = -1, ymax = 1, scale = 3, zmin = 0, zmax = 2, z buffer = sort, ] % Here comes the code \addplot3[ surf, shader = interp, samples = 50, samples y = 20, domain = 0:2*pi, domain y = 0:1, colormap/violet, ] ( {cos(deg(x)) * y}, {sin(deg(x)) * y}, {y} ); \end{axis} \end{tikzpicture} \end{document} but it has inverted the cone and I cannot think why, I tried to alter the z-axis to -y but this didn't work. Can anybody help me to turn the cone around? Thanks.
- pgf: 3D Graphing sqrt(-x-y^2+8) results in a jagged surfaceby tangulo on October 2, 2023 at 1:15 am
The plot of this specific elliptic paraboloid, sqrt(-x-y^2+8) comes out looking like this. I've tried parameterizing the surface, writing the equation in different forms, and messed around with the domain. The error I get most of the time is something about the z axis and having a mismatched number of rows and cols. Can someone help me by figuring out to make the surface smooth and well just not look like this? \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{3d, calc} \pgfplotsset{compat=1.18} \usepackage{tikz-3dplot} \begin{document} \begin{tikzpicture} \begin{axis}[axis lines=center] \addplot3[domain=-3:3, y domain=-3:3, samples=10, surf, shader=interp] {sqrt(-x-y^2+8)}; \end{axis} \end{tikzpicture} \end{document}
- How can I remove the Labels of the blue dots on the left plot and change the position of label nr16 in the right plot?by dan1365 on March 30, 2023 at 9:46 am
\documentclass[11pt]{report} \usepackage{pgfplots, pgfplotstable} \pgfplotsset{width=10cm,compat=1.18} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \begin{document} \begin{figure} \centering \begin{subfigure}[tb]{0.48\linewidth} \begin{tikzpicture} \begin{axis}[height=7cm, width=\linewidth, xlabel={}, ylabel={}, ytick={0,500,...,1700}, xtick={0,500,...,1700}, ymin=-170, ymax=1700, xmin=-170, xmax=1700, ymajorgrids, xmajorgrids] \addplot[ scatter/classes={0={blue}, 1={red}}, scatter, mark=*, only marks, scatter src=explicit symbolic, nodes near coords*={\Label}, visualization depends on={value \thisrow{label} \as \Label} %<- added value ] table [meta=class] { x y class label 0.3788 8.1653 0 - 6.3716 4.0196 0 - 0.4225 0.1447 0 - 14.8118 6.6124 0 - 2.7433 2.544 0 - 152.0046 30.6336 1 5 1375 428.5714 1 6 20.51 5.1280 0 - 38.8548 1492.8425 1 8 0.1409 0.000196 0 - }; \end{axis} \end{tikzpicture} \caption{} \label{} \end{subfigure}\hfill \begin{subfigure}[tb]{0.48\linewidth} \begin{tikzpicture} \begin{axis}[height=7cm, width=\linewidth, xlabel={}, ylabel={}, ytick={0,2,...,10}, xtick={0,5,...,20}, ymin=-1.133, ymax=11.333, xmin=-2.266, xmax=22.666, ymajorgrids, xmajorgrids] \addplot[ scatter/classes={0={blue}, 1={red}}, scatter, mark=*, only marks, scatter src=explicit symbolic, nodes near coords*={\Label}, visualization depends on={value \thisrow{label} \as \Label} %<- added value ] table [meta=class] { x y class label 0.3788 8.1653 0 9 6.3716 4.0196 0 10 0.4225 0.1447 0 12 14.8118 6.6124 0 13 2.7433 2.544 0 14 20.51 5.1280 0 15 0.1409 0.000196 0 16 }; \end{axis} \end{tikzpicture} \caption{} \label{} \end{subfigure}\hfill \caption{} \end{figure} \end{document} > Blockquote
- pgfplots: 3D Axes System. Reverse xlabelby Dr. Manuel Kuehner on November 3, 2022 at 2:48 am
This question is about a 3D coordinate system in pgfplots. Problem 1: I want to have the xlabel on the "other side" (tried x dir = reverse, already). Problem 2: This is less important (nice to have). I want to have the perspective as in my hand drawing (a perfect cross: y and z, and the 3rd dimension, depth, is indicated by a 45 degree line: x), see "Remark" in the hand drawing. Additional Remark: In the hand drawing I use different labels (this is a typical automotive coordinate system). But I can fake that by just naming the xlabel "y" and so on. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ width = 80mm, height = 80mm, axis lines = center, no marks, axis line style = {latex-latex, ultra thick}, % unit vector ratio = 1 1 1, ticks = none, xmin = -1, xmax = 1, ymin = -1, ymax = 1, zmin = -1, zmax = 1, xlabel = $x$, ylabel = $y$, zlabel = $z$, ] % No plot \end{axis} \end{tikzpicture} \end{document} Related pgfplots: `x dir = reverse` --> Problem with x-label (`xlabel`) placement
- How to draw a shaded boundary using TikZby Sid on May 7, 2022 at 11:55 pm
How can I draw a simple shaded region such as the one shown below using TikZ? The shaded region bounded by the equation r1r2r3 - r1 - r2 - r3 + 2cos(theta) and is r1=r2=r3=4. The boundary will change slightly for different values of theta. For the purpose of this, we can assume theta=0. The idea here is to use TikZ with certain functions and fillbetween commands but this becomes tricky for 3D plots. This example could then be used to draw more involved boundaries Any tips/relevant posts would be helpful! EDIT I would ideally like a solution that just uses TiKZ and not pstricks.
- Tikz 3D plot of poles zerosby Raja Ali Riaz on September 18, 2021 at 4:43 pm
I need to make a 3D plot in tikz of the form as in the picture. It's the magnitude plot of transfer function H(s)= (s+1)(s+2)/(s+3)(s+1+j)(s+1-j) I am sorry, I have not shared any attempt because I am ignorant in tikz 3d plotting. If somebody provide the solution, it will be kick start for me and then I build up on it. Thanks in advance. My Attempt and still few things to rectify. I have plotted the graph with online help of different resources (code and picture attached). Now the problems are It is not correcting plotting the curve in y-z plane the red line and give this error message Package pgfplots Error: Sorry, you can't use 'y' in this context. PGFPlots expected to sample a line, not a mesh. Please use the [mesh] option combined with [samples y>0] and [domain y!=0:0] to indicate a twodimensional input domain. Labels are too small and not placed properly. If somebody can set view angles so it looks like the picture of the book. If somebody can help in that regard. \documentclass[border=1cm]{standalone} \usepackage{pgfplots} \usetikzlibrary{calc,math} \pgfplotsset{compat=newest} \pgfkeys{/pgf/declare function={H(\x,\y) = 3*((((((\x)^2-(\y)^2+3*(\x)+2)^2+((2*\x*\y)+3*\y)^2)+2.2204e-16)^(1/2))/(((((\x)^3+5*(\x)^2-3*\x*(\y)^2+8*x-5*(\y)^2+6)^2+(3*(\x)^2*y+10*\x*\y-(\y)^3+8*y)^2)+2.2204e-16)^(1/2)));}} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=middle, axis on top, axis equal image, width=50cm, view={30}{10}, xmin=-4, xmax=0, ymin=-2, ymax=2, zmin=0, zmax=5, miter limit=1, xlabel=$\sigma$, xlabel style={anchor=east,xshift=-5pt,at={(xticklabel* cs:.95)}}, ylabel=$j\Omega$, zlabel=$\mathopen| H(s)\mathclose|$, zlabel style={anchor=north east}, xtick = {-3,-2,-1,0}, hide obscured x ticks=false, ytick = {-1,0,1}, ztick = {2,4}, ] \addplot3[ smooth, surf, faceted color=gray, line width=0.1pt, fill=white, domain=-4:0, y domain = -2:2, samples = 50, samples y = 50, restrict z to domain*=0:5] {H(\x,\y)}; \addplot3[domain=-2:2,samples=70, samples y = 0,red, thick] ({0},{x},{H(0,x)}); \end{axis} \end{tikzpicture} \end{document}
- How to make multiple pgfplots share legend and Y label, retaining same size and ability to reference each plot?by Lars Kakavandi-Nielsen on August 25, 2021 at 7:01 am
For some time now I have been trying to have two (or more) plots made with pgfplot side by side (figure below shows my goal for three), with the leftmost plot having the ylabel, the centre having the legend above it (or in case of an even number of plots having the legend centred between the two middle once). Finally, I would like for each plot to have a referencable label and caption (besides the xlabel) However, the plot with the ylabel and the one with the legend always gets smaller (due to the added graphics of the label and the legend, I know) and I have not been able to find a solution to the issue. Is there a way to achieve what I want? Below is the normal way I add three plots using subfigure: \documentclass{report} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usepackage{subcaption} \begin{filecontents}{data.csv} X,Y,Z,N 0,1,2,3 1,2,3,4 2,3,4,5 4,4,5,6 \end{filecontents} \begin{document} \begin{figure} \centering \begin{subfigure}[t]{.3\textwidth} \centering \begin{tikzpicture} \begin{axis}[ylabel=DATA TEXT, width=.95\textwidth] \addplot+ table[x=X, y=Y, col sep=comma] {data.csv}; \end{axis} \end{tikzpicture} \caption{\label{fig:y} Shows Y} \end{subfigure}~ \begin{subfigure}[t]{.3\textwidth} \centering \begin{tikzpicture} \begin{axis}[width=.95\textwidth, legend style={at={(0.5,1.5)},anchor=north,legend columns=2}] \addplot+ table[x=X, y=Z, col sep=comma] {data.csv}; \legend{DATA} \end{axis} \end{tikzpicture} \caption{\label{fig:z} Shows Z} \end{subfigure}~ \begin{subfigure}[t]{.3\textwidth} \centering \begin{tikzpicture} \begin{axis}[width=.95\textwidth] \addplot+ table[x=X, y=N, col sep=comma] {data.csv}; \end{axis} \end{tikzpicture} \caption{\label{fig:n} Shows N} \end{subfigure} \end{figure} \end{document}
- Plotting a 3D graph in Latexby TaniaMalik on March 6, 2021 at 6:16 pm
I am trying to change the 2D scatter graph into 3D which can also take the value of the P column as z-axis. But the output I got is not smooth and I really don't understand how I can change it into 3D graph which shows the regions where cost DR, BR or SC is optimal for (P:Q:R) coordinates. Can any expert please help me draw a nice 3D graph of the given data? In the code, I am using a minimum dataset for illustration purpose although the actual file is so big with many data points. Here is the code: \documentclass[border=5mm]{standalone} \usepackage{pgfplotstable} \pgfplotsset{compat=1.16} \pgfplotstableread[col sep=comma]{ P, Q, R, cost 6, 3, 1, SC 6, 2, 2, SC 6, 1, 3, SC 5, 4, 1, DR 5, 3, 2, BR 5, 2, 3, DR 5, 1, 4, DR 4, 5, 1, DR 4, 4, 2, BR 4, 3, 3, BR }\MyData \begin{document} \begin{tikzpicture} % define a few macros for convenience \newcommand\AxisW{10cm} % width/height of axis \newcommand\AxisXMin{0.5} % xmin/ymin \newcommand\AxisRange{10} % range of axis, x y and z \begin{axis}[ % define how the different cases are drawn % all should have same mark and draw opacity, % but change the color as you prefer scatter/classes={ SC={mark=square*, draw opacity=0, fill=blue}, DR={mark=square*, draw opacity=0, fill=red}, BR={mark=square*, draw opacity=0, fill=green} }, % add labels for the axes xlabel=R, ylabel=Q, zlabel=P, % set up the size of the axis scale only axis, % width/height applies to axis box alone, without labels width=\AxisW, height=\AxisW, % set up the range of the axes xmin=\AxisXMin, xmax=\AxisXMin+\AxisRange, ymin=\AxisXMin, ymax=\AxisXMin+\AxisRange, zmin=\AxisXMin, zmax=\AxisXMin+\AxisRange, % calculate the mark size - divide by 2 because the size is half the width mark size={\AxisW/\AxisRange/2}, % set legend entries in one row legend columns=-1, % move legend outside top of axis legend style={at={(0.5,1.02)}, anchor=south}, % have ticks every 1 unit distance xtick distance=1,ytick distance=1,ztick distance=1, ] \addplot3 [ scatter, % make a scatter plot only marks, scatter src=explicit symbolic ] table[x=R, % use R-column for x-values y=Q, use Q-column for y-values z=P, % use P-column for z-values meta=cost % use cost-column to define which scatter class should be used ] \MyData; \legend{SC, DR, BR} \end{axis} \end{tikzpicture} \end{document}
- pgfplots: How to draw a Klein bottle?by cis on August 19, 2020 at 1:40 pm
I want to draw an unpretentious Klein bottle like that (that means: surface lines are ok, but not many colors; actually no grayscale either, like in my MWE below) wikipedia says me: But I get with that What do I have to set? \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture}[ declare function={ b=2; h=6; r(\u)=(2-cos(\u)); p(\u)=exp( -(0.5*\u-pi)*(0.5*\u-pi) ); q(\u)=exp( -(\u-1.5*pi)*(\u-1.5*pi) ); X(\u,\v)=b*(1-sin(\u))*cos(\u)+r(\u)*cos(\v)*(2*p(\u)-1); Y(\u,\v)=r(\u)*sin(\v); Z(\u,\v)=h*sin(\u)+0.5*r(\u)*sin(\u)*cos(\v)*q(\u); }, ] \begin{axis}[ xlabel=$x$, ylabel=$y$, zlabel=$z$, %view/h=-10, ] \addplot3[ surf, z buffer=sort, colormap={mycolormap}{% color=(black) color=(white) }, %semitransparent, trig format plots=rad, domain=0:2*pi, domain y=0:2*pi, %restrict y to domain=-1:1, %samples=41, samples y=25, variable=\u, variable y=\v, point meta=u, ] ({X(\u,\v)}, {Y(\u,\v)}, {Z(\u,\v)}); \end{axis} \end{tikzpicture} \end{document}
- Best practice for plots (pgfplots, gnuplot, etc.)by burny on July 27, 2020 at 8:44 am
I am writing a fairly large article with a lot of different plots. They range from simple ones like abs(x) or x^2 to high-polynomials with their first and second derivative, and nonlinearities (sigmoid, tan, etc.). Sometimes they are also in 3 dimensions. I am using pgfplot within tikzpicture and then gnuplot. For the easy plots, this is straightforward. However, the more complex plots (that may include non-continuity points), the gnuplot expression becomes harder and harder to understand and maintain. For some plots, I need randomly created points anyway (created once, and then fixed), which need to be "classified" according to a function. For all plots, I have (or could create) Python scripts to output a coordinates table that would be possible to use within the pgfplot table import functionality. This may seem overkill for x^2 but is really necessary for the more complex plots. And with the higher polynomials, I don't have to do the derivates manually. This works for plots that are points or lines in 2D but not in 3D because the number of points for the imported table exceeds LaTeX's memory (x and y have 1000 samples each, which results in 1,000,000 coordinates). As I have the functions in Python anyway, I could also use matplotlib (or seaborn, etc.) to create pdfs with the plot. This has the disadvantage that the plots do not look like they would when drawing with LaTeX/gnuplot (different colors, styles, etc.), so I would have to maintain the styles in two different places. Is there a best practice for this type plotting? I want one type of plot (either only gnuplot or only Python) and not a mixture of different methods.
- Plotting function ℝ² →ℝ with pole at (0,0) smoothlyby Wizard of Math on May 30, 2020 at 1:56 pm
I would like to plot the function f: ℝ² →ℝ, definited by f(x,y)=(xy)/(x^2+y^2). But the following problem comes up: At (0,0) the function is not continous and therefore it looks kind of jagged. To solve this problem i could force the function to input specific points but i can't find it anywhere an don't know if that is even possible. Code: \begin{tikzpicture}[] \begin{axis}[axis lines=center, axis on top, xtick=\empty, ytick=\empty, ztick=\empty, xrange=-2:2, yrange=-2:2 ] % function \addplot3[domain=-2:2,y domain=-2:2,colormap/viridis,surf,opacity=0.5,samples = 55] {(x*y)/(x^2+y^2)}; \end{axis} \end{tikzpicture} How do i make this function look smooth? Any help would be greatly appreciated 🙂 (Just increasing the Samples doesnt do that much, and I run into the following error: TeX capacity exceeded, sorry [main memory size=3000000])
- pgfplot renders jagged polynomialby JohnD on November 24, 2019 at 3:21 am
I keep getting a very jagged plot of this 9th degree polynomial, regardless of using smooth or increasing the sample points. Ideas? \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{fpu} \begin{document} \begin{tikzpicture}[scale=.55] \begin{axis}[ xlabel={$x$}, ylabel={$y$} ,restrict y to domain=-10^9:10^9 ,axis lines=middle ,samples=2000, %,grid ,thick ,domain=0:4 ,xtick={0,1,2,3,4} ,ytick={0,9} ,xmin=0 ,xmax=4.5 ,ymin=-1 ,ymax=1.8 ,xlabel shift={1in} ,y tick label style={yshift={5pt}} %,legend pos=outer north east ] \addplot+[black,no marks,smooth]{1.5*x + 3.83333*x^2 - 15.0104*x^3 + 22.7454*x^4 - 19.2028*x^5 + 9.37731*x^6 - 2.5978*x^7 + 0.377315*x^8 - 0.0222801*x^9}; \end{axis} \end{tikzpicture} \end{document}
- Plotting 3d surface from data pointsby NaveganTeX on July 26, 2019 at 7:47 pm
I have the following code which works great and produces the plot I want. This is it: \documentclass[border=5mm]{standalone} \usepackage{pgfplots, filecontents} \begin{filecontents*}{filename.txt} 0 0 -0.64 1 0 -0.5 2 0 -0.4 3 0 -0.31 4 0 -0.23 5 0 -0.2 6 0 -0.24 7 0 -0.32 8 0 -0.42 9 0 -0.59 10 0 -0.76 0 1 -0.54 1 1 -0.4 2 1 -0.27 3 1 -0.17 4 1 -0.08 5 1 -0.03 6 1 -0.05 7 1 -0.14 8 1 -0.27 9 1 -0.45 10 1 -0.63 0 2 -0.46 1 2 -0.31 2 2 -0.16 3 2 -0.03 4 2 0.07 5 2 0.12 6 2 0.11 7 2 0.02 8 2 -0.13 9 2 -0.32 10 2 -0.51 0 3 -0.44 1 3 -0.26 2 3 -0.08 3 3 0.07 4 3 0.18 5 3 0.25 6 3 0.24 7 3 0.14 8 3 -0.01 9 3 -0.2 10 3 -0.41 0 4 -0.44 1 4 -0.26 2 4 -0.04 3 4 0.13 4 4 0.25 5 4 0.32 6 4 0.31 7 4 0.22 8 4 0.07 9 4 -0.14 10 4 -0.37 0 5 -0.44 1 5 -0.26 2 5 -0.05 3 5 0.14 4 5 0.27 5 5 0.34 6 5 0.33 7 5 0.24 8 5 0.09 9 5 -0.12 10 5 -0.36 0 6 -0.48 1 6 -0.29 2 6 -0.08 3 6 0.09 4 6 0.22 5 6 0.29 6 6 0.28 7 6 0.2 8 6 0.06 9 6 -0.13 10 6 -0.35 0 7 -0.55 1 7 -0.34 2 7 -0.15 3 7 -0.0 4 7 0.11 5 7 0.18 6 7 0.18 7 7 0.11 8 7 -0.02 9 7 -0.2 10 7 -0.39 0 8 -0.63 1 8 -0.44 2 8 -0.27 3 8 -0.13 4 8 -0.03 5 8 0.04 6 8 0.04 7 8 -0.02 8 8 -0.13 9 8 -0.29 10 8 -0.45 0 9 -0.71 1 9 -0.59 2 9 -0.43 3 9 -0.28 4 9 -0.18 5 9 -0.13 6 9 -0.13 7 9 -0.17 8 9 -0.26 9 9 -0.38 10 9 -0.53 0 10 -0.83 1 10 -0.75 2 10 -0.59 3 10 -0.45 4 10 -0.35 5 10 -0.3 6 10 -0.3 7 10 -0.34 8 10 -0.42 9 10 -0.52 10 10 -0.66 \end{filecontents*} \begin{document} \begin{tikzpicture} \begin{axis}[view={-20}{20}, grid=both] \addplot3[surf] file {filename.txt}; %\addplot3[surf, point meta=explicit] table [z expr=0.5, meta index=2] {filename.txt}; \end{axis} \end{tikzpicture} \end{document} Now, my data points are the following: \documentclass[border=5mm]{standalone} \usepackage{pgfplots, filecontents} \begin{filecontents*}{filename.txt} 10 0 2.8637 15 0 2.8131 20 0 2.8727 25 0 2.8644 30 0 2.8842 35 0 2.8675 40 0 2.7089 45 0 2.6247 10 0.001 2.8436 15 0.001 2.8692 20 0.001 2.8859 25 0.001 2.4132 30 0.001 2.7664 35 0.001 2.8796 40 0.001 2.8752 45 0.001 2.8782 10 0.002 2.8752 15 0.002 2.8693 20 0.002 2.8703 25 0.002 2.6594 30 0.002 2.8643 35 0.002 2.5554 40 0.002 2.8875 45 0.002 2.8887 10 0.003 2.8151 15 0.003 2.8856 20 0.003 2.8701 25 0.003 2.857 30 0.003 2.8785 35 0.003 2.6176 40 0.003 2.8835 45 0.003 2.9234 10 0.004 2.8815 15 0.004 2.8792 20 0.004 2.8213 25 0.004 2.8877 30 0.004 2.9202 35 0.004 2.8595 40 0.004 2.885 45 0.004 2.8489 10 0.005 2.8907 15 0.005 2.8521 20 0.005 2.6148 25 0.005 2.8762 30 0.005 2.8576 35 0.005 2.8363 40 0.005 2.7048 45 0.005 2.7617 10 0.006 2.8599 15 0.006 2.8941 20 0.006 2.8474 25 0.006 2.876 30 0.006 2.8206 35 0.006 2.5735 40 0.006 2.3208 45 0.006 2.3754 10 0.007 2.8833 15 0.007 2.8886 20 0.007 2.8691 25 0.007 2.6355 30 0.007 2.7528 35 0.007 2.5829 40 0.007 2.583 45 0.007 2.5111 10 0.008 2.8711 15 0.008 2.8815 20 0.008 2.8452 25 0.008 2.7511 30 0.008 2.5907 35 0.008 2.5598 40 0.008 2.6029 45 0.008 2.5253 10 0.009 2.8708 15 0.009 2.6844 20 0.009 2.7038 25 0.009 2.6988 30 0.009 2.4988 35 0.009 2.4059 40 0.009 1.8292 45 0.009 2.2368 10 0.01 2.8806 15 0.01 2.8899 20 0.01 2.386 25 0.01 2.5372 30 0.01 2.3707 35 0.01 2.1165 40 0.01 2.1553 45 0.01 2.3411 10 0.011 2.8725 15 0.011 2.7136 20 0.011 2.5851 25 0.011 2.4942 30 0.011 2.478 35 0.011 2.3578 40 0.011 2.465 45 0.011 2.0726 10 0.012 2.8873 15 0.012 2.6652 20 0.012 2.6406 25 0.012 2.4053 30 0.012 2.3922 35 0.012 2.3308 40 0.012 2.3423 45 0.012 2.0778 10 0.013 2.8902 15 0.013 2.7437 20 0.013 2.6815 25 0.013 2.2707 30 0.013 2.1961 35 0.013 2.1585 40 0.013 2.2469 45 0.013 2.3896 10 0.014 2.8826 15 0.014 2.6679 20 0.014 2.4037 25 0.014 2.2751 30 0.014 2.3569 35 0.014 2.3838 40 0.014 2.2706 45 0.014 2.2171 10 0.015 2.8688 15 0.015 2.5697 20 0.015 2.4726 25 0.015 2.2542 30 0.015 2.344 35 0.015 2.3119 40 0.015 2.0676 45 0.015 2.2591 \end{filecontents*} \begin{document} \begin{tikzpicture} \begin{axis}[view={-20}{35}, grid=both] \addplot3[surf] file {filename.txt}; % \addplot3[surf, point meta=explicit] table [z expr=0.2, meta index=2] {filename.txt}; \end{axis} \end{tikzpicture} \end{document} And get the following disaster: Could you tell me whats going on and how could I fix this issue? I need to fix the scale where it says 10^-2. I want to have on the x axis from 0 to 0.015 with steps of 0.001. This is the desired output:
- Moebius strip borderby BlueTiger on June 21, 2019 at 2:43 pm
I am trying to draw a red border of a Moebius strip. I have tried several things, playing with shader=faceted and mesh but I could not achieve this. The code : \documentclass[english]{article} \usepackage{pgf,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ hide axis, view = {40}{40} ] \addplot3 [ surf, colormap={blackwhite}{gray(0cm)=(1); gray(1cm)=(0.5)}, shader = faceted interp,opacity = 0.7, %shader = interp, point meta = x, samples = 40, samples y = 4, z buffer = sort, domain = 0:360, y domain =-0.5:0.5 ] ( {(1+0.5*y*cos(x/2)))*cos(x)}, {(1+0.5*y*cos(x/2)))*sin(x)}, {0.5*y*sin(x/2)} ); \end{axis} \end{tikzpicture} \end{document} Do you have an idea?
- How can I draw tangents at inflection points automatically?by minhthien_2016 on June 17, 2019 at 3:36 am
The function f(x) = \frac{x^4}{12}-\frac{2x^3}{3}+\frac{3 x^2}{2} has two inflection points x = 1 and x = 3. I draw the tangents at the above points by hand. \documentclass[tikz,border=3.14mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[ xtick={-2,-1,...,5}, xticklabel=\empty, ytick={-2,-1,...,5}, yticklabel=\empty, grid=major, axis x line=center, axis y line=center, xlabel={$x$}, ylabel={$y$}, xlabel style={below}, ylabel style={left}, xmin=-2, xmax=5, ymin=-2, ymax=5] \addplot[color=blue,smooth,samples=501, thick,domain=-5:5] {(3* x^2)/2 - (2 *x^3)/3 + x^4/12}; \addplot[color=purple,smooth,samples=501, thick,domain=-5:5] {-(5/12) + (4 *x)/3}; \addplot[color=red,smooth,samples=501, thick,domain=-5:5] {9/4}; \end{axis} \end{tikzpicture} \end{document} How can I draw the tangents at inflection points of every function automatically
- How can I repair incorrect tangents at the points on the curve?by minhthien_2016 on June 16, 2019 at 2:21 pm
Let be the function f(x) = -(1/162) x^5 + 17/162 x^4 - 43/162*x^3 - 179/162*x^2 + 212/81* x + 134/81 The solutions of the equation f'(x) = 0 are x=-2\lor x=1\lor x=4\lor x=\frac{53}{5} I tried to draw the tangents at the points x = -2, x = 1 and x = 4. I got the incorrect result. My code \documentclass[tikz,border=3.14mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.16} \usepgfplotslibrary{fillbetween} \usetikzlibrary{intersections} \makeatletter \def\parsenode[#1]#2\pgf@nil{% \tikzset{label node/.style={#1}} \def\nodetext{#2} } \tikzset{ add node at x/.style 2 args={ name path global=plot line, /pgfplots/execute at end plot visualization/.append={ \begingroup \@ifnextchar[{\parsenode}{\parsenode[]}#2\pgf@nil \path [name path global = position line #1-1] ({axis cs:#1,0}|-{rel axis cs:0,0}) -- ({axis cs:#1,0}|-{rel axis cs:0,1}); \path [xshift=1pt, name path global = position line #1-2] ({axis cs:#1,0}|-{rel axis cs:0,0}) -- ({axis cs:#1,0}|-{rel axis cs:0,1}); \path [ name intersections={ of={plot line and position line #1-1}, name=left intersection }, name intersections={ of={plot line and position line #1-2}, name=right intersection }, label node/.append style={pos=1} ] (left intersection-1) -- (right intersection-1) node [label node]{\nodetext}; \endgroup } } } \makeatother \begin{document} \begin{tikzpicture}[>=latex] \begin{axis}[ grid, %axis y line =none, %axis x line =none, axis x line=center, axis y line=center, xtick=\empty, ytick=\empty, %xtick={-5,-4,...,5}, %ytick={-5,-4,...,5}, xlabel={$x$}, ylabel={$y$}, xlabel style={below}, ylabel style={left}, xmin=-5.5, xmax=5.5, ymin=-5.5, ymax=5.5, tangent/.style={ add node at x={#1}{ [ sloped, append after command={(\tikzlastnode.west) edge [thick,black] (\tikzlastnode.east)}, minimum width=0.2\textwidth ] } }] \addplot[color=blue,smooth,samples=500, thick,tangent/.list={-2,1,4},domain=-5:5] {-(1/162)*pow(\x,5)+17/162*pow(\x,4)-43/162*pow(\x,3)-179/162*pow(\x,2)+212/81*\x+134/81}; \end{axis} \end{tikzpicture} \end{document}
- A hyperbolic triangle embedded in a saddle-shaped surfaceby Tony on August 16, 2018 at 5:49 pm
This is the diagram I would like to recreate. (from https://en.wikipedia.org/wiki/Hyperbolic_triangle) From Is there any easy way to draw a ruled surface like a hyperbolic paraboloid in TikZ?, I found a way to draw the saddle-shaped surface. Is there a way to draw the triangle on it? And get the colours/transparency like the picture? \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot3 [surf,shader=flat,draw=black] {x^2-y^2}; \end{axis} \end{tikzpicture} \end{document}
- Tikz isn't plotting the right functionby John 545 on November 17, 2017 at 11:29 pm
Im trying to plot a probability function in tikz, but the line plotted isn't even close to how the function should look. Im new to using latex and I have no idea why this isnt working, unless tikz just cant handle this function. Here is my code: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ declare function={Probability(\n,\k) = 1-((\n!)/((\n^(\k))*((\n- \k)!)));} ] \begin{axis}[ no markers, domain=0:15, samples=2500, axis lines=left, xlabel=$k$, ylabel=$y$, every axis y label/.style={at=(current axis.above origin),anchor=east}, every axis x label/.style={at=(current axis.right of origin),anchor=north}, height=10cm, width=15cm, xtick={0,2,4,6,8,10,12,14}, ytick={0.1,0.2,0.3,0.4,0.5,.6,.7,.8,.9,1}, enlargelimits=false, clip=false, axis on top, grid = major, xmax=15 ] \addplot [very thin,cyan!20!black] {Probability(10,x)}; \end{axis} \end{tikzpicture} \end{document} This is what the function should look like, And this is what tikz is plotting I would appreciate it if someone could point me in the right direction. Thanks
- pgfplots 3D plots size versus 2D plots sizeby Nils on December 9, 2015 at 9:31 pm
I wanted to create a 3D plot but it's not possible for me to set the right size. Should I try out until I find the right values for height and width for the 3D plot or is there an easy way to find them? \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ height=5cm, width=5cm, axis lines=center, xtick=\empty, ytick=\empty, xmin=-13,xmax=13,ymin=-13,ymax=13, xlabel=$x$, ylabel=$y$, ] \end{axis} \end{tikzpicture} \begin{tikzpicture} \begin{axis}[ view={30}{25}, height=5cm, width=5cm, axis lines=center, xtick=\empty, ytick=\empty, ztick=\empty, xmin=-13,xmax=13,ymin=-13,ymax=13,zmin=-13,zmax=13, xlabel=$x$, ylabel=$y$, zlabel=$z$, ] \end{axis} \end{tikzpicture} \end{document}
- Special decoration for TikZ pin featureby Chris on June 15, 2014 at 9:37 am
I try to achieve the curvy pin style I sketched below. It would help to distinguish pin lines from grid and other lines in the diagram. How can I realize a decoration that automatically draws such a curve? How can I integrate this with the pin feature? The code for the picture: \documentclass[tikz,convert]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[ pin distance=5mm, every pin edge/.style={ decorate, decoration={ snake, pre length=4pt } } ] \begin{axis}[ width=12cm, height=5cm, xmin=0,xmax=4, ] \addplot coordinates {(1,1) (3,3)} coordinate [pos=.5] (a) coordinate [pos=.7] (b); \node [pin=135:From the manual] at (a) {}; \path (a) ++(-45:1cm) node (c) {What I want}; \draw [gray] (c) to[out=110,in=-70] (a); \path (b) ++(-45:.8cm) node [right] (d) {What I want II}; \draw [gray] (d.west) to[out=160,in=-20] (b); \end{axis} \end{tikzpicture} \end{document} (I tagged with pgfplots as well since this would be a common application.)
- plot 3d graphs of functions defined implicitlyby Jay on October 23, 2013 at 2:52 pm
How can I plot 3d graphs of functions defined implicitly (quadratic forms, for Linear Algebra course notes -- I'd like to include lots of examples)? As far as I can see it is not possible with pgfplots and not through gnuplot either. Is there any package that will help with that? For example, parabolic and hyperbolic cylinders, hyperboloids, ellipsoids, etc. Concrete examples: 2xy + 2xz = 1 (hyperbolic cylinder) (x^2)/(2^2) + (y^2)/(3^2) + (z^2)/(2^2) = 1 (ellipsoid) I also see that Maxima can do this: (%11) hc:2*x*y+2*x*z=2; (%i2) draw3d(enhanced3d=true,implicit(hc,x,-5,5,y,-5,5,z,-5,5)); This will work fine (the hyperbolic cylinder is correctly plotted on the screen), but I don't know what backend Maxima uses for this, and I'd like to use a plain LaTeX method, or something that could be called from LaTeX, as I may have to send the document for others to compile themselves on different environments.
- Helix on a cylinderby Grimolatto on August 24, 2013 at 8:49 am
I want to plot geodesics on a cylinder. These are straight lines, circles or helices. I can plot the first two, but I don't know how to draw the helices. To be precise, I would like to know how to draw an helix on this cylinder (passing thru two points A and B, but the location of the points is not relevant), using TikZ exclusively (maybe with pgfplots, but without using pstricks): \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} \begin{tikzpicture} \node [cylinder,rotate=90,draw,aspect=2,minimum width=2cm,minimum height=3.5cm](C){}; \draw[fill] (-0.5,-0.5) circle [radius=0.045]node[below]{$A$}; \draw[fill] (0.5,0.75) circle [radius=0.045]node[below]{$B$}; \end{tikzpicture} \end{document}