Created
March 10, 2023 06:22
-
-
Save abikoushi/89a75230285de86fd71e403410f1a2b2 to your computer and use it in GitHub Desktop.
draw curve on tikz
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[dvipdfmx, margin=5pt]{standalone} | |
\usepackage{tikz} | |
\begin{document} | |
\begin{tikzpicture} | |
\def \gamma{\x, \x * exp(-\x)} | |
\fill [fill=gray!30] (0.5,0) -- plot[domain=0:0.5] (\gamma) -- (0.5, 0) -- cycle; | |
\fill [fill=gray!30] (2,0) -- plot[domain=2:2.5] (\gamma) -- (2.5, 0) -- cycle; | |
\fill [fill=gray!30] (4,0) -- plot[domain=4:5] (\gamma) -- (5, 0) -- cycle; | |
\draw[color=black, domain=0:5, samples=100] plot (\gamma) node[right] {}; | |
\draw[->, very thin] (0,0) -- (5.1,0) node[right] {}; | |
\draw (0.25, 0) node[below] {$h_1$}; | |
\draw (1.25, 0) node[below] {$\cdots$}; | |
\draw (2.25, 0) node[below] {$h_j$}; | |
\draw (3.25, 0) node[below] {$\cdots$}; | |
\draw (4.5, 0) node[below] {$h_m$}; | |
\end{tikzpicture} | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment