These days to read some code and a few macro package of documentation, is a little bit of the experience of drawing.
Generally, the picture can be divided into two categories: one is the bitmap, and the other is the vector graph. The so-called bitmap, said the popular point is magnified will cause distortion has jagged image, this kind of picture is very common, such as jpg,gif,bmp and so are bitmap format. This kind of picture is easy to obtain, of course the disadvantage is also very obvious, is the picture quality is not high. The so-called vector diagram can be arbitrary scaling, coordinate transformation without loss of information, graphics will not produce jagged effect. The advantages of this kind of diagram are naturally needless to say. The vast majority of drawing software can generate bitmap plots, the generation of vector graphics software is relatively few, such as CorelDRAW, Adobe Illustrator, Inkscape and so on.
In this way, drawing software can also be divided into two kinds naturally. The following highlights the tools for drawing vectors. Vector drawing software can also be divided into two categories (in fact, all of the drawing software can be classified as such): One is the GUI (graphical user Interface, GUI, belongs to the visualization), the other is the CLI (command lineinterface, life The two tools also broadly represent different concepts. The former is a WYSIWYG (what do you see are get), WYSIWYG, and the WYTIWYG (what are you Think are what do you get)? specifically to the application, the former is represented by CorelDRAW, Adobe Illustrator, Inkscape, etc., and the latter is represented by various software or macro packages based on LaTeX. This article only lists these two kinds of commonly used software, does not involve the pros and cons comparison. In fact, different software has a different emphasis on the surface, it is really impossible to say exactly which kind of good bad.
First, the GUI
As mentioned earlier, CorelDRAW, Adobe Illustrator, and Inkscape are among the most common and powerful software in GUI drawing software. CorelDRAW and Inkscape I have used, their interface is very similar, the function is quite. The difference is that CorelDRAW is commercial software (cracked version on the internet), and Inkscape is open source cross-platform software (currently the latest version is 0.91). Inkscape is used all the time, except because it is open source, the main reason is that it supports latex mathematical formula extension, that is, when drawing with Inkscape, which can use latex command to generate beautiful formula annotation. This is not available with other software (the formula used in CorelDRAW needs to be copied from Mathtype or Word). is the Inkscape interface.
Second, the CLI
At present, most of the science and technology paper writing is latex typesetting system, especially in foreign Sci magazine, they almost will require latex writing, probably not only because it is completely free, can be transplanted across the platform, the most important is its beautifully typesetting and even more than some commercial software. LaTeX itself also comes with some drawing functions, but it can only draw some simple exchange diagrams and so on. We can use some of the TeX system-based macro packages or tools to achieve the purpose of vector drawing. The most famous of these are the following four:
1. MetaPost
2. Asymptote
3. Pgf/tikz
4. Pstriks
The former two belong to the offline do diagram tool, the latter two belong to the online diagram tool. What do you mean offline Diagram tool? What do you call an online diagram tool? Simply put, the offline diagram is to create a separate file, and then generate a PDF or EPS and other independent graphics files, through the \includegraphics command to embed the graphics file into the LaTeX file. MetaPost and Asymptote belong to this. Online diagram is directly in the TeX file input the corresponding macro package of the drawing command, after processing directly generated graphics. Pgf\tikz and Pstricks belong to this class.
Syntactically speaking, MetaPost is said to be more bizarre in grammar, difficult to learn the mastery (I have not used, just heard); Asymptote I used before, its syntax is similar to the C/C + + (the language is really bull), and then give up mainly because the feeling of offline mapping is not very convenient (pure personal feeling) Pstricks, based on Postscript, is said to be more powerful, but I didn't use it to comment.
Functionally, the metapost can solve the equation, and the 3D effect of asymptote is very good. There is no good or bad in either of these ways. Offline do diagram more flexible, online make plans more convenient, the key to see a person likes, like more Vim and Emacs which is better, I think the answer is only the programmer himself most understand.
Here is the Pgf/tikz, this is what I am using now, itself Pgf/tikz is a Tex extension package, easy to use, simply add the command in the introduction area of the Tex document \usepackage{tikz} You can use it. At present, Pgf/tikz can draw many kinds of graphs, such as flowchart, finite state machine diagram, neural network Diagram, two-dimensional/three-dimensional data graph and so on. With Pgf/tikz's plot command you can draw some less complex function graphs, and if the graphics are complicated we have a way of using another macro package based on Pgf/tikz pgfplots (in fact Pgf/tikz can, but pgfplots stronger) and other software ( such as Gnuplot,r,matlab,mathematica, etc.) combined to draw. You may ask why not just use Gnuplot software to paint, but also make such a mess? That is because although the Gnuplot,matlab software is easy to draw, they do not look good, especially the label customization is very poor, which will lead to the picture and the overall style of the paper is not good. This may be the reason why you look at a foreigner's paper and the pictures are very beautiful and you draw a picture that doesn't look good. To put it simply, for example, MATLAB, we can use its powerful data processing ability to generate the data needed for the drawing, first export the data processed by MATLAB (. txt or. dat, etc.), this is easy to do, only a few lines of matlab command to be done, and then use the command \addplot {filename.dat} It is OK to call the previously processed data for pgfplots, so that you can draw a vector diagram that is both beautiful and defines the dimension style. is not so easy! No need to worry about my pictures anymore ...
Both the GUI and the CLI drawing tools have various advantages and disadvantages. GUI is more intuitive, this is the shortcomings of the CLI, CLI drawing more accurate, and the GUI is a bit rough, not so fine. There is no such thing as a tool to kill all the graphics, and the combination is a wise choice. When the GUI can be easily and quickly drawn out, there is absolutely no need to use the CLI to draw, and vice versa. For example, the following Petersen diagram with Inkscape is easy to draw out (of course, with TikZ is also very convenient).
However, what if this is the picture below? Obviously, it is cumbersome to use GUI tools such as Inkscape.
And if you use TikZ, you just need the following code to do it:
1 \documentclass{minimal}2 \usepackage{TikZ}3 \usetikzlibrary{calc}4 5 \begin{document}6 \pgfdeclarelayer{background}7 \pgfdeclarelayer{foreground}8 \pgfsetlayers{background,main,foreground}9 \xdefinecolor{Darkgreen} {RGB} {175,193, $}Ten \newcounter{cntshader} One \newcounter{cntroot} A \setcounter{Cntshader} { -} - \def\couleur{darkgreen} - the \begin{tikzpicture} - \foreach\yinch{ the, -, the}{ - \setcounter{Cntshader} {1} - \coordinate(a) at (0,0); + \coordinate(b) at (0:1); - \foreach\xinch{1,..., \y}{% + \coordinate(c) at ($ (b)!1cm! the:(a) $); A \begin{pgfonlayer}{background} at\draw[fill=\couleur!\thecntshader] (a)--(b)-(c)--cycle; -\End{Pgfonlayer} - \setcounter{cntroot}{\x} - \addtocounter{Cntroot} {1} - \node[Fill=white,Draw,Circle,Inner Sep=1pt] at (c) - {$\sqrt{\thecntroot}$}; in \coordinate (b) at (c); - \pgfmathsetcounter{Cntshader} {\thecntshader+4} to \setcounter{cntshader}{\thecntshader} + } - } the \node[Fill=white,Draw,Circle,Inner Sep=1PT] at (0:1) {$\sqrt{1}$}; *\End{tikzpicture} $ Panax Notoginseng\End{document}
A note on the drawing software