Original article link
Brief list of visualization tools
In this article, we will conduct a survey on many popular Linux data visualization tools and further discuss some of them. For example, does a tool provide a language for numerical calculation? Is this tool interactive or does it provide a batch processing mode for independent operations? Can I use this tool to process images or digital signals? Does this tool provide language binding to support user applications?ProgramIntegration (such as Python, TCL, Java)Programming LanguageEtc )? The graphic processing capabilities of some tools will also be displayed. Finally, the strengths of each tool will be analyzed to help us determine which tool is best suited for computing tasks or data visualization.
The Open Source tools explored in this article include (the licenses used by each tool are also provided ):
- Gnuplot (GPL)
- GNU Ave ave (GPL)
- SCILAB (SCILAB)
- Mayavi (BSD)
- Maxima (GPL)
Gnuplot
Gnuplot is a good visualization tool that has existed since 1986. Without a gnuplot graph, it is difficult to read the paper. Although gnuplot is a command line-driven tool, it is also evolving and now supports many non-interactive applications. For example, it can be used as a GNU octave Drawing Engine.
Gnuplot is highly portable and can run on UNIX, Microsoft Windows, Mac OS X, and many other platforms. It supports a wide range of output formats from postscript to recent PNG.
Gnuplot can be operated in batch mode. It provides a command script to generate a graph and runs it in non-interactive mode, this allows us to try its features to understand the effects of their plotting.
There is a standard Math Library corresponding to the Unix Math Library in gnuplot that can be used. Function parameters support integer, real, and complex types. You can set the math library to radians or degrees (the default is radians ).
Gnuplot can be used for plotting.PlotCommand to generate a 2-D image, or useSplotCommand to generate a 3-D image (as a 2-D projection ). UsePlotCommand, gnuplot can be operated in the Cartesian two-dimensional coordinate system.SplotThe command uses the Cartesian coordinate system by default, but it also supports spherical or cylindrical coordinate systems. You can also draw contour lines in the graph (as shown in figure 1 below ). There is a new style of DrawingPm3dYou can use three-dimensional and 4d data mapped using the color palette as maps or surfaces.
The following is a simple gnuplot example, which provides a 3-D image with contour lines and hidden line elimination. Listing 1 shows the gnuplot command used, and Figure 1 shows the generated graphic result.
List 1. Simple gnuplot function Diagram
Set samples 25 set isosamples 26 set title "test 3D gnuplot" set contour baseset hidden3d offset 1 splot [-12:12. 01] [-12:12. 01] sin (SQRT (x ** 2 + y ** 2)/SQRT (x ** 2 + y ** 2) |
Listing 1 fully shows how simple the gnuplot command set is. The sampling speed and drawing density are determined by samples and isosamples, and the title is provided by the title parameter for the image. The basic contour and hidden line Elimination features are also enabled, and the final plot is to useSplotCommands are created using functions in the math library. Result 1 is displayed.
Figure 1. A simple plot of gnuplot
In addition to creating function diagrams, gnuplot can also draw graphs contained in files. Consider the x/y Data pair shown in Listing 2 (a short version of this file ). The data pairs in this file represent the X and Y axes of a two-dimensional space.
Listing 2. gnuplot sample data file (data. dat)
88 9979 9876 8960 85... 60 22 |
If you want to plot the data in a two-dimensional space and connect each data point with a line, you can use the gnuplot script in listing 3.
Listing 3. gnuplot script used to plot the data in Listing 2
Set title "sample data plot" plot 'data. dat 'using t 'data points', \ "data. dat" using t "lines" with lines |
Result 2 is displayed. Note that gnuplot automatically provides the axis scale, but you can control it if you need to mark the position of the image.
Figure 2. Simple plotting using data files in gnuplot
Gnuplot is a good visualization tool and is well known as part of many GNU/Linux releases. However, if you want to perform basic data visualization and numerical computing, GNU Ave ave may be the tool we want to find.
Back to Top
GNU Ave ave
GNU Ave ave is a high-level language designed for numerical calculation. It is a strong competitive product of MATLAB commercial software produced by Mathworks. In addition to the simple command set provided by gnuplot, Ave ave also provides a rich language for mathematical programming. We can even use C or C ++ to write our own applications and then interact with Ave ave.
Octave was originally written in 1992 as an auxiliary software for chemical reactor design textbooks. The authors hope to help students solve the design problems of the reactors without debugging the FORTRAN program. The results show a very useful language and provide an interactive environment for solving numerical problems.
Ave ave can be operated in a script mode without interaction, or through C and C ++ language binding. Ave ave itself has a very rich language that looks very similar to C and has a large mathematical library, it includes some special functions used in signal and image processing, audio processing, and control theory.
Because Ave ave uses gnuplot as its backend implementation, you can use octave to draw everything that can be drawn using gnuplot. Ave ave does have a richer language for computing. It has many obvious advantages, but it still has some limitations on gnuplot.
In the example (simpleexamples) provided on the octave-Forge web site below, a Lorentz strange attractor is drawn. Listing 4 shows the Interactive dialog box used by Ave ave on cygwin windows. This example shows how to use lsode, a common differential equation calculator.
Listing 4. Use Ave ave to present Lorentz Strange Attractor
GNU Ave ave, version 2.1.50 copyright (c) 1996,199 7, 1998,199 9, 2000,200 1, 2002,200 3 John W. eaton. this is free software; see the source code for copying conditions. there is absolutely no warranty; not even for merchantibility orfitness for a particle purpose. for details, type 'warranty '. please contribute if you find this software useful. for more information, visit http://www.octave.org/help-wanted.htmlReport bugs to <bug-Ave ave & bevo.che.wisc.edu>.> function Y = Lorenz Z (x, t) y = [10 * (X (2)-x (1); X (1) * (28-X (3 )); X (1) * X (2)-8/3 * X (3)]; endfunction> X = lsode ("Lorenz", [3; 15; 1], (0: 0.) ');> gset parametric> gsplot x> |
Figure 3 shows the octave in Listing 4.Code.
Figure 3. Lorentz plot drawn using Ave ave
GNU Ave ave (consistent with gnuplot) can be usedMultiplotFeatures display multiple images on one page. With this feature, you can define the number of images to be created and then useSubwindowCommand to customize a specific image. After defining the child window, you can generate your own graph normally, and then jump to the next child window (as shown in listing 5 ).
Listing 5. generate multiple images in Ave ave
> Multiplot ()> subwindow ()> T = 0: 0. 1: 6. 0> plot (T, cos (t)> subwindow (1, 2)> plot (T, sin (t)> subwindow (2, 1)> plot (T, Tan (t)> subwindow (2, 2)> plot (T, Tanh (t )) |
The generated multi-chart page is shown in Figure 4. This is a good feature for comparing and comparing related images.
Figure 4. Use GNU Ave ave to draw multiple Diagrams
We can think that Ave ave is an advanced language that uses gnuplot as the background implementation for visualization. It provides a rich mathematical library and is a free replacement product for Matlab. It can be easily extended using user-developed packages for voice processing, optimization, and symbol computing. Ave ave is available in some releases of GNU/Linux, such as Debian. It can also be used on Windows and Mac OS X that uses cygwin. For more information about Ave ave, see references.
Back to Top
SCILAB
SCILAB is similar to GNU Ave ave in enabling numerical computation and visualization. SCILAB is an interpreter and advanced language widely used in engineering and scientific applications in the world.
SCILAB was born in 1994 and was designed by France's INRIA (effecut national de recherche en informatique et en Automatique) and enpc (école nationale des ponts et chauss es. SCILAB began to be maintained by SCILAB consortium since January 1, 2003.
SCILAB contains a large mathematical function library that can be expanded using programs written in advanced languages such as C and FORTRAN. It also provides the ability to overload data types and operations. It includes an integrated high-level language, but this language is slightly different from the C language.
SCILAB has many toolkit that provide 2-D and 3-D graphic animation, optimization, statistics, icons and networks, signal processing, hybrid dynamic system simulation and simulation, and many othersCommunityContribution.
SCILAB can be used in most Unix systems and also in newer Windows operating systems. Like GNU Ave ave, SCILAB also provides good documentation. Because it is a European project, you can also find many documents written in other languages except English andArticle.
After SCILAB is started, a window is displayed to allow us to interact with it (5 ).
Figure 5. Interaction with SCILAB
In this example, a vector (t) is created, and its value ranges from 0 to 2 Pi (step size: 0.2 ). Then a 3-D graph is generated (using Z = f (x, y), or a surface at the XI, Yi point ). Figure 6 shows the generated graph.
Figure 6. SCILAB diagram generated by the command in Figure 5
SCILAB contains many libraries and functions that can draw graphics with minimal complexity. The following is an example of generating a simple 3D bar chart:
--> Hist3d (5 * (RAND (5, 5 ));
First,Rand (5, 5)A matrix of 5 to 5 is constructed, which contains some random values (the maximum value is 5 ). This matrix is passed to the function.Hist3d. The column Chart 7 is displayed.
Figure 7. Generate a random three-dimensional bar chart
SCILAB and Ave ave are very similar. They all have a great foundation for community participation. SCILAB is written in Fortran 77, while Ave ave is written in C ++. Octave uses gnuplot for visualization, while SCILAB provides its own library. If you are very familiar with MATLAB, Ave ave is a good choice, because it strives to achieve compatibility with Matlab. SCILAB contains many mathematical functions, so it is very suitable for signal processing. If you are not sure which tool you want to use, try it all. They are good tools and can be used to complete different tasks.
Back to Top
Mayavi
Mayavi stands for magicians in Sanskrit. It is a data visualization tool that is bound to Python with a powerful Visualization Toolkit (VTK) for graphical display. Mayavi also provides a graphical user interface (GUI) developed using the tkinter module ). Tkinter is a TK interface, which is usually used with TCL.
Mayavi was initially developed for Computational Fluid Dynamics (CFD) as a visualization tool. When people realized its utility in other fields, it was re-designed as a universal scientific data visualization tool.
The magic behind mayavi comes from VTK. VTK is an open source system for data visualization and image processing. It is widely used in the scientific community. VTK encapsulates many functions through the scripting interface provided by Tcl/tk, Java programming language, and Python plus the C ++ library. VTK is portable in many operating systems, including UNIX, windows, and Mac OS X.
The mayavi shell around VTK can be imported from other Python programs as a python module, and scripts can be written through the python interpreter. The tkinter GUI provided by mayavi allows you to configure and apply filters and render some lighting effects based on visualization.
Figure 8 shows an example of using mayavi for visualization on the Windows platform.
Figure 8. 3-D visualization using mayavi/VTK (cardiac CT scan)
Mayavi is an interesting example of extending VTK In the python scripting language.
Back to Top
Maxima
Maxima is a symbolic and numerical computing program, which is the blood of Ave ave and SCILAB. The initial development team of Maxima started its MIT (masheng Polytechnic Institute) in 1870s and is still under maintenance. The initial version (a computer algebra system) was named Doe macsyma, which opened the path to more well-known applications (such as Mathematica) developed later.
MAXIMA provides a set of expected feature sets (such as calculus, analytical linear systems, and nonlinear equality sets) and symbolic computing capabilities. In maxima, you can also find some clues about lisp (from the reference function,MapAndApply). Maxima is written in LISP and can execute lisp code in maxima sessions.
MAXIMA has a good online help system, which is based on hypertext. For example, if you want to know how a specific maxima function works, you can simply enterExample (desolve)And then it provides a variety of examples.
MAXIMA also has some interesting features, such as rules and patterns. These rules and patterns are used by programs that simplify expressions. Rules can be used for exchange and non-exchange algebra.
Maxima is very similar to Ave ave and SCILAB: The interpreter can be used to interact with users, and the results are provided directly in the same window or displayed in another window. In Figure 9, you are requested to draw a simple 3-D image.
Figure 9. Interaction with maxima
The generated graph 10 is shown.
Figure 10. maxima image generated by the command in Figure 9
Back to Top
Outlook
This article describes several open-source GNU/Linux visualization tools. Other useful tools include GRI, pgplot, scigraphica, plotutils, NCAR Graphics, and imlib3d. These are open source code, which means you can see how they work. If you want to, you can also modify them. In addition, if you are looking for a good graphic simulation environment, check the Open Dynamics Engine (ODE) used with OpenGL ).
The specific requirements determine which tool is the most suitable for use. If you want to use a project with a lot of VisualizationAlgorithmMayavi is the tool you are looking. GNU Ave ave and SCILAB are ideal for visualized numeric computing. If you need the symbolic computing capability, maxima is a good choice. Finally (but not unimportant), if you only need some basic drawing functions, gnuplot can well meet this requirement.
References
Learning
- For more information, see the original article on the developerworks global site.
- Los Alamos National Laboratory not so frequently asked questions is a good resource for using gnuplot, where you can find answers to more complex gnuplot questions.
- Browse a large number of Ave ave scripts, functions, and extensions on GNU octave repository. You can also find tips for adding extensions for Ave ave-Forge.
- If you are more interested in statistics, read Part 1 of the three series of articles "Write a statistical program using R", "a large number of statistical tools at the beginning" (developerworks, 1st ), it briefly introduces the features of this toolkit; Part 1 "functional programming and data exploration" (developerworks, 2nd) introduces features that look closer to the r language; and part 2 "reusable and object-oriented programming" (developerworks, 3rd), which introduced the object-oriented features of the r language and more general programming concepts of the r language.
- For Python programmers looking for ways to quickly process arrays, refer to "Cute Python: Numerical Python" (developerworks, October 2003 ).
- In the developerworks Linux area, you can find more resources for Linux developers.
- Stay tuned to developerworks technical events and network broadcasts.
Obtain products and technologies
- The gnuplot homepage is a good place to download gnuplot software and find documents. You will also find a demo Image Library, which helps you understand what images can be drawn using gnuplot, and how to cut these features for your application.
- GNU Ave ave is an advanced language used for numerical computation. It uses gnuplot as its own graphics engine. It is a good alternative to commercial MATLAB software. Its website contains information about downloading and accessing more documents.
- You can download mayavi data visualizer from sourceforge.net. Here you can also find some documents and a list of features provided by mayavi for VTK.
- Visualization Toolkit (VTK) is a powerful open-source software that can be used for 3-D computer plotting, image processing, and visualization operations. On this site, you can also find software, documentation, and many useful links to using VTK.
- SCILAB is a free scientific Software Package for numerical computation and graphical visualization. On this site, you can find the latest version of SCILAB and information about documents and other users (for example, how to contribute to this project ).
- Maxima is a substitute for Maple and Mathematica in addition to open source code implementation of Ave ave and SCILAB. It not only has good support for mathematical computing capabilities, but also is outstanding in programming with embedded LISP Language for symbol processing.
- The NCAR Graphics home page provides a stable UNIX package for plotting profile, MAP, surface, meteorological, x-y, and many other images.
- GRI is a high-level language used by scientific graphics programs. It can be used to construct an x-y graph, a profile graph, and an image that can be precisely controlled by graphic attributes.
- Scigraphica is ideal for data analysis and technical graphics processing.
- The imlib3d library is an open source software package for Processing 3-D images. Its main goal is to make processing as simple as possible.
- Ode is an open-source physical engine that can effectively implement modeling of physical systems. By combining it with open/GL, you can obtain an excellent environment for graphic simulation.
- Order a free SEK for Linux with two DVDs, including the latest IBM for Linux trial software, including DB2, Lotus, rational, Tivoli, and websphere.
- Use IBM trial software to build your next Linux development project, which can be downloaded directly from developerworks.