Horizontal Bar Graphs With Labels in Gnuplot

January 10th, 2011
tech
I wanted a horizontal bar graph with labels. Gnuplot doesn't like to make such things, but after a while of searching I figured out how to convince it to. Data file:
  # index, age, name
  1       24      jeff
  2       25      julia
  3       22      rose
  4       20      alice
  
Gnuplot file:
  set terminal png size "200x200"
  set output 'demo.png'
  set nokey
  unset border
  unset xtics

  plot 'demo.dat' using 1:(-1):3 with labels rotate right, \
       'demo.dat' using 1:2 with boxes
  
Then rotate right in an image editor to get:

Recent posts on blogs I like:

Book Review: The Myth of Sex Addiction

I. David Ley’s The Myth of Sex Addiction is a stupid, wrong book saved only by the fact that the people it’s arguing with are stupider and wronger. II. “Sex addiction” is a proposed mental health condition, not recognized by the DSM or the ICD, where a pe…

via Thing of Things March 7, 2024

Your wedding doesn’t have to be that great

Your future happiness does not depend on how gorgeous this one day is. The post Your wedding doesn’t have to be that great appeared first on Otherwise.

via Otherwise March 4, 2024

When Nurses Lie to You

When the nurse comes to give you the flu shot, they say it won't hurt at all, right? And you trust them. Then they give you the shot, and it hurts! They lied to you. A lot of nurses lie to children about shots and blood draws. Part of it is they probabl…

via Lily Wise's Blog Posts February 28, 2024

more     (via openring)