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:

Comment via: substack

Recent posts on blogs I like:

Parenting standards and the village

Cartoons Hate Her has written about the village nobody wants. In principle, parents usually want a community to help take care of their kids: someone to bring meals when they get sick, keep an eye on their children while they play, and talk to about paren…

via Thing of Things December 19, 2025

Opinionated takes on parenting

This post is a collection of parenting takes that sometimes go through my head, based on my experience raising our two boys (5 and 2 years old). All of this is based on my experience and might not apply to others (see the law of equal and opposite advice)…

via Victoria Krakovna December 16, 2025

How to Make a Christmas Wreath

Yesterday, I made a Christmas wreath. Here's how to make one. First, find an evergreen tree near your house. Clip off a few branches from the tree. Try to have as many leaves or needles on the branches as possible. Next, bring them home. What I usu…

via Anna Wise's Blog Posts December 6, 2025

more     (via openring)