Stoppt die Vorratsdatenspeicherung! Jetzt klicken & handeln!Willst du auch bei der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:

Sammelsurium

Hier ist alles zu finden, was auf den anderen Seiten keinen Platz gefunden hat ...

Ascal

Im Sommer 2006 haben wir im Rahmen des Allgemeinen Programmierpraktikums das (weitesgehend unbekannte) Brettspiel Laska in C++ implementiert. Dieses Projekt befindet sich samt Quelltext auf SourceForge:

3D Bar Graph using Gnuplot

Suppose you have a grayscale bitmap (see left figure) and want to make a 3d bar graph (see right figure) out of this data using Gnuplot. The input format Gnuplot needs for this task can be found in a FAQ about Gnuplot, however the actual code to convert given data into this format is left as a homework.

bitmap (left) and gnuplot graph (right)

What follows is the solution:

Preparing the bitmap

First the image has to be saved in the plain text PGM graphics format using Gimp. The PGM file then looks like this example: example.pgm

Conversion

This PGM file can be converted using a simple C++ program called pm3d.cpp. Asuming the compiled binary is also named pm3d, the conversion is done by:
./pm3d example.pgm example.dat

Displaying the result

Now Gnuplot can be invoked to get a nice 3d plot:
gnuplot> splot "example.dat" w lines
or:
gnuplot> splot "example.dat" w pm3d
or even:
gnuplot> set view map
gnuplot> splot "example.dat" w pm3d

Problems and Fixes

RTC on a recent PC with Linux 2.6.25

Symptom

The Computer freezes randomly since the installation of kernel 2.6.25 and 2.6.26 didn't cure the problem. It used to be rock solid with 2.6.24.

Keywords

linux, debian, crash, freeze, random, 2.6.24, 2.6.25, 2.6.26, rtc, chrony, ntp, thinkpad, t60

Solution

If you are using chrony as a ntp client you can just comment out the line beginning with rtcfile in the /etc/chrony/chrony.conf. I haven't experienced these lookups with ntpd.

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.
© 2006-2010 Nils Kanning, Steffen Klemer