File talk:Number of deaths from Palestinian terror in the British mandate and Israel 1920-2021.svg

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Recreation instructions[edit]

Using gnuplot:

  1. Create a csv file named "data.csv" with the number of deaths per year (data can be found here)
  2. Change your gnuplot font to a font with support for Hebrew characters (such as "Courier New")
  3. Run the following commands in gnuplot:
# choose data
set datafile separator ","
set xdata time
set xrange ["1920":"2021"] # Last number is the latest year you have data for

# format data
set timefmt "%Y"       
set format x "%Y"
# using '365.25' to account for leap years:
set xtics "1920",60*60*24*365.25*2,"2021" # Last number is the latest year you have data for
set mxtics 2

# style and colors
set xtics rotate by 90 nomirror right textcolor "black"
set ytics nomirror textcolor "black"
set tics out
set border linecolor "#ababab"
set term svg size 800,600

# labels
set encoding utf8
set label 1 "מאורעות" at "1923",42 center front
set label 2 "תרפ\"א" at "1923",30 center front

set label 3 "מאורעות" at "1929",140 center front
set label 4 "תרפ\"ט" at "1929",128 center front

set label 5 "המרד" at "1937",126 center front
set label 6 "הערבי" at "1937",114 center front
set label 7 "הגדול" at "1937",102 center front

set label 8 "מלחמת" at "1948",400 center front
set label 9 "העצמאות" at "1948",388 center front

set label 10 "פדאיון" at "1954",70 center front

set label 11 "פתחלנד" at "1973",85 center front

set label 12 "האינתיפאדה" at "1990",82 center front
set label 13 "הראשונה" at "1990",70 center front

set label 14 "האינתיפאדה" at "2002",482 center front
set label 15 "השניה" at "2002",470 center front


# create graph
set output "output.svg"
plot 'data.csv' using 1:2 notitle with lines lc "red" # data.csv is the filename
unset output

מיכאל.צבאן (talk) 14:29, 31 March 2022 (UTC)[reply]