For tasks like this you can do everything with coordinates. As mentioned in the comments of your question, the package to use is pgfplots. It's text based, but very easy to use. I think it's actually better than Matlab for getting the plot how you want quickly. For example, your first plot would be (updated, thanks Jake!)
\documentclass[10pt]{article}
\usepackage{pgfplots}
\begin{document}
\pgfplotsset{width=6cm,compat=newest}
\begin{figure}[ht]
\begin{tikzpicture}
\begin{axis}[
scale only axis,
xlabel={$x$-axis},
ylabel={$y$-axis},
ymin=-1.5,
ymax=1.5,
xmin=-0.5,
xmax=1.5,
]
\addplot[color=blue,thick] coordinates {
(0, 0)
(0, 1)
(1, 1)
(1, 0)
};
% The following command puts the line in on the axis.
\draw ({rel axis cs:0,0} |- {axis cs:0,0}) -- ({rel axis cs:1,0} |- {axis cs:0,0});
\end{axis}
\end{tikzpicture}
\end{figure}
\end{document}
which gives you this:
Now that may look like a lot of code, but most of it is reusable. The axes labels are obvious, and the ranges too. This should be pretty clear if you're used to plotting in matlab. The scale only axis
is to make the size of the pgfplot axes 6cm rather than the entire plot with labels.
Things are added to the canvas with \addplot
. In this case I put in coordinates directly; perfect for your sketches. You can put in a file instead though. If your file contains columns of data with labels at the top. For example, this code
\pgfplotsset{width=6cm,compat=newest}
\begin{axis}[
scale only axis,
xlabel={$\tau$ ($\mu$s)},
ylabel={P(bitflip)},
ymin=0,
ymax=1,
xmin=0,
xmax=125.66,
]
\addplot[thick,color=red]
table[x=time,y=fidelity] {data.txt};
\end{axis}
\end{tikzpicture}
with a data file data.txt
that looks like this (tab delimited and easy to produce with Matlab)
time fidelity
0.00000000e+00 0.00000000e+00
2.16135894e-01 1.11612759e-04
7.52429193e-01 8.16588122e-04
1.29606053e+00 8.76288172e-04
1.84266188e+00 7.06435551e-04
2.40147636e+00 7.93280613e-04
2.95870895e+00 6.89534671e-04
3.50977092e+00 8.62614471e-04
produces this
The most notable benefits of this approach is that if you're doing lots of similar plots you need only alter a few lines of coordinates, and that the typeface matches in size and style with the rest of your document. Another benefit is that the size of the plot is very easy to control, which I always found difficult with Matlab. Finally, if something changes, like you decide to use a different colour or correct a label, then it's a quick edit, rather than regenerating a whole graphic by opening up an external package.
I suggest you mix-and-match.
For truly arbitrary yet still technical drawings (even complex ones) like parts of an aircraft and mechanical components, I would suggest Google SketchUp. As a taste of drawing a model jet, consider viewing a quick YouTube video.
You can also use parts of already-created models from the 3D Warehouse:
You can even scale up to full size:
As a tutorial on working with SketchUp, consider the Harwood Podcast Network SketchUp: A 3D Toolbox podcast. Also see Draw an aircraft with Tikz.
For mathematical graphs and diagrams (something that has more expressible structure, mathematically), you can use any of the graphical packages used throughout this site: tikz
, pstricks
, Asymptote, ...
Best Answer
One way to draw such a diagram is to use node positioning. Here is a version that you can play around with.
The result is