MW

Tag gnuplot

Recent Posts

Tracking Memory Consumption Using Pmap (March 19, 2012)

Massif is a really nifty tool which is very powerful, especially paired with my visualizer. The caveat of course is that it slows down the application considerably, I’ve seen anything up to a factor of 100… I see no alternative to Massif when it comes to investigating where your memory problems come from. But if you just want to see whether you have a problem at all, tracking the total memory consumption should suffice.

A few days ago, I came across pmap on Stack Overflow, which makes it easy to track the RSS memory consumption of an application using the -x switch. Of course I had to write some bash magic to automate this process and visualize the data using Gnuplot! Behold:

memory consumption of PhantomJS
memory consumption of a PhantomJS script over ~30min

continue reading...

How to generate proper DIN A4 sized plots with Gnuplot (January 14, 2011)

I’ve had a major annoyance today: The plot generated by gnuplot looked good inside the wxt terminal but I simply couldn’t get a proper fullsized DIN A4 postscript exported. This is how I’ve done it now:

  1. Inside gnuplot:
```bash
set size ratio 0.71 # this is the ratio of a DIN A4 page (21/29.7)
set terminal postscript enhanced landscape "Arial" 9 # you can change landscape to portrait and the fontname and -size
set output 'yourfilename.ps' # this is your export file
replot # or put your custom plot command here ```
  1. In a shell:
```bash
ps2ps -sPAGESIZE=a4 yourfilename.ps new_dina4_file.ps ```
  1. Now you can simply print new_dina4_file.ps from within KGhostView for example. Have fun!

continue reading...