Math & Science ⇒ Drawing mathematical Figures
Drawing mathematical Figures
I would like to draw three mathematical figures as shown in the attached file. I have tried to use the xypic package but could not get them. How can I get them?
Thanks
- Attachments
-
- CalculDiff.pdf
- (64.99 KiB) Downloaded 819 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- Stefan Kottwitz
- Site Admin
- Posts: 10358
- Joined: Mon Mar 10, 2008 9:44 pm
Drawing mathematical Figures
you could use TikZ or PSTricks. For an inspiration, have a look at
Stefan
Drawing mathematical Figures
Code: Select all
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}
\begin{tikzpicture}
\draw[->] (-2,0) -- (2,0) node[right] {$x$};
\draw[->] (0,-2) -- (0,2) node[left] {$y$};
\draw (-2,-2) -- (2,2);
\draw (-2,2) -- (2,-2);
\draw[domain=-1.3:1.3,variable=\t]
plot ({cosh(\t)},{sinh(\t)})
plot ({-cosh(\t)},{sinh(\t)})
plot ({sinh(\t)},{cosh(\t)})
plot ({sinh(\t)},{-cosh(\t)});
\foreach \t in {-0.9,0,0.9}{
\pgfmathsetmacro{\px}{cosh(\t)}
\pgfmathsetmacro{\py}{sinh(\t)}
\draw[thick,->,red] (\px,\py) -- ++($0.3*(\py,\px)$);
\draw[thick,->,red] (-\px,\py) -- ++($0.3*(\py,-\px)$);
\draw[thick,->,red] (\py,\px) -- ++($0.3*(\px,\py)$);
\draw[thick,->,red] (\py,-\px) -- ++($0.3*(-\px,\py)$);
}
\foreach \t in {0.3,1,1.6}{
\draw[thick,->,red] (\t,\t) -- ++(0.4,0.4);
\draw[thick,->,red] (-\t,-\t) -- ++(-0.4,-0.4);
\draw[thick,->,red] (\t,-\t) -- ++(0.4,-0.4);
\draw[thick,->,red] (-\t,\t) -- ++(-0.4,0.4);
}
\end{tikzpicture}
\begin{tikzpicture}
\draw[->] (-2.5,0) -- (2.5,0) node[right] {$x$};
\draw[->] (0,-2.5) -- (0,2.5) node[left] {$y$};
\draw (0,0) circle[radius=1];
\draw (0,0) circle[radius=2];
\foreach \angle in {0,90,180,270}{
\draw[rotate=\angle,->] (1,0) -- ++(0,1.2);
\draw[rotate=\angle,->] (2,0) -- ++(0,1.5);
}
\node[above left] at (0,0) {$0$};
\node[left] at (-2,2) {$X(x)$};
\end{tikzpicture}
\begin{tikzpicture}
\foreach \angle in {0,45,...,350}{
\draw[shorten <=10pt,->] (0,0) -- (\angle:2);}
\node at (0,0) {$0$};
\node[right] at (45:2) {$X(x)$};
\end{tikzpicture}
\end{document}
Re: Drawing mathematical Figures
For the code you submitted, it does not work. There is an error message during the execution. Could you tell me how do you execute it ?
Once again thanks.
Drawing mathematical Figures
You should include the error message in your post.
To see what version you have installed, try the following:
Code: Select all
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
\pgfversion
\end{document}
The result is
Re: Drawing mathematical Figures
The error message during the execution is "!Package PGF Math error: Unknown function 'cosh'".
Thanks
Re: Drawing mathematical Figures
If you are using MikTeX, it comes with a package updater. I can't say more because I don't use it.
If you are using TeXLive, there is also an updater. On Linux it is a command line utility (someone else can tell you what the command is, I don't know it). On the Mac, there is a graphical interface called TeXlive Utility. Unfortunately, for the moment, the repository is frozen until the 2011 version is ready.
You may find it on CTAN and manually install it (or at least place it in the folder you are working in)
Re: Drawing mathematical Figures
My system is MikTex, I have downloaded the latest one (MikTek 2.9) which came with pgf 2.1. I tried the code, it works or compiles fine. Thank you so much.
-
- Posts: 1
- Joined: Tue Aug 09, 2011 10:06 am
Re: Drawing mathematical Figures
this is my first post in the community.
Talking of pstricks, is it capable of producing
nice-looking graphs as in the attached document?
Put another way, what kind of tools the authors
of this document used in order to produce their
graphs?
- Attachments
-
- From site http://igm.univ-mlv.fr/~lecroq/string/index.html
- snapshot1.png (49.99 KiB) Viewed 11570 times