I'd like to make an animation that illustrates the positions of some agents I'm simulating under Linux.
Basically, I have some files named file00001.dat, file00002.dat and so on.
I have to generate "something" that get files in order, and output an animated gif, a dynamic graph or whatever, that simulates the moving reading data from file.
I have control on the files, meaning that I can put identifiers or everything I want.
How would you achieve that? What programs would you use?
In linux, gnuplot is the old standby. And it can do animated gif's as well.
There are many choices, but in general matplotlib is a good one. It is a python library, so you have powerful libraries available to fine-tune or analyse your data set if you want to go beyond just quick plots. For very simple stuff you can always use the pyplot module from matplotlib that has many commands known from MATLAB or gnuplot.
For producing animations see this question.
As an added plus its default outputs are much better than e.g. gnuplot's or plotutils'.
Related
for a university project I have to compute a 3D mesh, then display it.
By mesh I mean a list of triangles, where each point has a specific elevation.
What is the easiest tool that exists both on windows and linux that would allow me to display such a mesh?
I just want to be able to visualize the mesh and rotate it, and I can code any specific mesh format needed to be used as an input.
What I mostly want is a tool that is easy to install for the final user of my program.
Almost every tool reads the .obj format, for example MeshMan, MeshLab and ArtOfIllusion. They all work under Windows and Linux. Geomview (.off-Files) is also great, but hard to install under Windows.
I'm using for this purpose osgviewer from OpenSceneGraph
I wouldn't know about the easiest tool, but have you tried Blender? It's cross platform.
There are some standard file formats for triangle meshes. Try outputing to .ply file and using one of the existing viewers for that.
I tend to use VTK file formats since I work in scientific visualization; that would be overkill for you.
In fact, I wrote a VTK/QT based app for viewing meshes that can handle .ply files https://github.com/HalCanary/vtkviewer.
I am new at graphing tools for big data analysis. Though the following is not from big data, I was wondering what kind of tools are used to create this kind of complex graph:
http://www.bitmover.com/lmbench/mem_lat3.pdf
Associated with the paper http://www.bitmover.com/lmbench/lmbench-usenix.pdf
The article is made in LaTeX (particulary groff project), according to metadata in the chart's PDF, it's saved to PDF from Photoshop (so this lead ends here). Anyway, the TikZ or Asymptote (see gallery) are capable of drawing charts like this..
Looks a little bit like gnuplot, but it can be perfectly done by matplotlib. An example can be found at this page.
Sorry, I never noticed this question before. Larry borrowed that graphic from me and it was created with Excel.
I was considering adding code to lmbench to create that plot automatically and Thorsten's suggestion of mplot3d sounds like a good place to start.
I am definitely puzzled by the capabilities of the existing terminals for gnuplot (wxt, ...). It's quite impossible to edit quickly the chart on the interface (change color of one curve, hide one curve, export in eps with the current rendering (without switching terminals) etc...).
The "windows" term has some nice feature (linestyle editing, etc...) but I am still waiting for something more "complete".
Some operations like "hiding a line" are non-intuitive for the gnuplot command language (actually the only solution that I know is to rewrite the plot command) and that's why I am looking for a terminal that will leverage some specific intermediate representation of the plotted object to allow the user to change quickly the design.
Do you have any information about this kind of tools ?
Note: I can't post more than two links because I'm a new-ish user here...
A quick search reveals several (probably abandoned) projects with similar parity to what you're asking for:
UniGNUPlot -Graphic GNUPlot front-end, last update in 2009-07-17
JAVA gnuplot GUI, last update in 2010-04-19
XGFE, last known update in 1999-01-01 and probably best avoided due to its age...
Honestly, I'd recommend something like QtiPlot (which also has the advantage of being cross platform) which is your typical "data analysis and scientific visualisation solution". I know it's not of the same paradigm as gnuplot, but it's easy to use.
If you would insist on using gnuplot as the backend, then an interesting perl wrapper called gplot (search sourceforge) exists that you can call from the command line. From the website, the syntax seems straightforward
# plot 3 sets of data, specify colors and points
gplot.pl -color green -point uptriangle 1a.data \
-color blue -point box 2a.data \
-color green -point circle 3a.data
but again, this is quite dated (last update 2009-07-17).
The major issue for these older gnuplot front ends is that gnuplot had a change of syntax for a few features (such as line color and style) a few years ago. I can't seem to find the precise version at which it changed at the moment, but the change did happen. Depending on how willing you are to change the source code of these wrappers, I do not imagine much tweaking would be needed.
How to render (to image) text on path with any renderer working on linux?
Like this: text on path.
Performance is important.
Short answer:
I'm on a Debian Squeeze system with the python-cairo package installed. If I run the warped text example it provides (85 lines of Python):
python /usr/share/doc/python-cairo/examples/warpedtext.py
it produces a warpedtext.png file like this:
I imagine it'd be fairly easy to modify/adapt/port the example.
Long answer:
There are two things you need to do this.
The ability to generate the transforms which will place individual letters with the correct position and orientation along the path. This is basic 2D transform geometry.
The ability to render transformed characters/font glyphs with a decent level of quality (sub-pixel precision, antialiasing etc).
For the latter, I'd be looking at one of
Qt's QPainterPath (this example seems to be exactly what you want, but see also this one).
Cairo (another example).
Anti-Grain Geometry.
Does anyone know how to draw queue network graphs that can be included within LaTeX documents?
See, e.g., the following examples at TeXample.net for the TikZ and PGF packages:
Graphs
Automata and Petri nets
Use METAPOST for your problem.
There are many ways to include drawings/graphs/images in your latex document.
The easiest way is just to draw the graph in your drawing program of choice, then export the graph to jpg or png (or eps if you're not using PDFlatex), then use the graphicx package ( \usepackage{graphicx} in your preamble), and include the graph in your document by using the code
\includegraphics[width=4in]{filename.jpg}
As indicated in other answers, there are several drawing languages that can be used with tex: metapost, tikz, and PGF are are powerful. There is also asymptote, another code based drawing language.
You could also use graphviz, which is excellent if your graph is large and you need graph something like network traffic. And dot2tex will turn your graphviz file into something latex can handle.