diff --git a/img/plot/Makefile b/img/plot/Makefile
index 12005f2ab4effbd4d886a03ba846523104823ed9..ac60ce6a4ca79cda7a791528de025278c7a0cf22 100644
--- a/img/plot/Makefile
+++ b/img/plot/Makefile
@@ -1,16 +1,16 @@
-SOURCES_CSV = $(wildcard *.csv)
+SOURCES_R = $(wildcard *.R)
 
-OBJECTS_CSV_SVG = $(SOURCES_CSV:.csv=.svg)
+OBJECTS_R_SVG = $(SOURCES_R:.R=.svg)
 
 OBJECTS = \
-	$(OBJECTS_CSV_SVG) \
+	$(OBJECTS_R_SVG) \
 
 all: $(OBJECTS)
 
 $(OBJECTS):
 
-%.svg: %.csv
-	Rscript --vanilla $*.R
+%.svg: %.R %.csv
+	Rscript --vanilla $<
 
 clean:
 	rm -f $(OBJECTS)