Math & Science ⇒ Drawing mathematical Figures
Drawing mathematical Figures
Hello,
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
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 810 times
NEW: TikZ book now 40% off at Amazon.com for a short time.

- Stefan Kottwitz
- Site Admin
- Posts: 10345
- Joined: Mon Mar 10, 2008 9:44 pm
Drawing mathematical Figures
Hi,
you could use TikZ or PSTricks. For an inspiration, have a look at
Stefan
you could use TikZ or PSTricks. For an inspiration, have a look at
Stefan
LaTeX.org admin
Drawing mathematical Figures
Using Tikz, one possible version is as follows.
I hope this helps
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
Hi and thanks for your advises.
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.
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
I tried it again and it compiles fine. It is probably the version of the pgf/tikz engine. I'm using version 2.1.
You should include the error message in your post.
To see what version you have installed, try the following:
If you have an earlier version, you should upgrade.
The result is
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
You right, it is the version of the pgf. Mine is 2.00. How can I update it or install the latest version, the one you are using ?
The error message during the execution is "!Package PGF Math error: Unknown function 'cosh'".
Thanks
The error message during the execution is "!Package PGF Math error: Unknown function 'cosh'".
Thanks
Re: Drawing mathematical Figures
How to get the latest version depends on your system.
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)
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
Thanks Frederic,
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.
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
Hi all,
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?
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 11419 times