Image talk:Untagged Images Remaining.png

From Wikipedia, the free encyclopedia

[edit] How to make this graph

I use gnuplot on a Linux system. It should work with Cygwin on that other OS, if you know what you're doing with it.

I copy and paste the data from the web browser into a text file called "itags.dat". It looks like this:

* 26-Aug-2004 - 01:05 = 48,655 remaining
* 10-Dec-2004 - 05:48 = 36,971 remaining
* 11-Dec-2004 - 03:32 = 34,363 remaining
* 12-Dec-2004 - 06:36 = 32,352 remaining
* 13-Dec-2004 - 13:06 - 30,958 remaining

With my browser, at least, the bullet characters get copied as asterisks, so that is handled in this script, which generates the PNG image:

#!/bin/sh

TITLE="Untagged Images Remaining"
YLABEL="Images"
FILE=`echo "$TITLE" | sed 's/\ /_/g'`.png

TMP="_gpdata_$$"
trap "/bin/rm -f ${TMP} ; exit" 0

sed    's/\*//g
       s/,/ /g
       s/^[    ]*//
       s/Jan /January /
       s/Feb /February /
       s/Mar /March /
       s/Apr /April /
       s/Jun /June /
       s/Jul /July /
       s/Aug /August /
       s/Sep /September /
       s/Oct /October /
       s/Nov /November /
       s/Dec /December /
       s/[     ][       ]*/ /g
       /^[     ]*$/d' ${1:-itags.dat}  > ${TMP}

gnuplot <<_EOF_ || exit 1

#10-Dec-2004 - 05:48 = 36,971 remaining
set timefmt "%d-%b-%Y - %H:%M"
set xdata time
set nox2tics
set size .67,.5
set title "${TITLE}"
set xlabel " "
set ylabel "${YLABEL}"
set grid ytics noxtics
#set logscale y
set yrange [0:]

set terminal png color small
set output '${FILE}'
set pointsize .5

plot '${TMP}' using 1:5 title '' with lines 1 \
       , '' using 1:5 title '' with points 3 \

_EOF_


This, of course, is released under the terms of the GFDL.

--Kbh3rd 16:44, 13 Dec 2004 (UTC)