source: trunk/years_gnuplot.xsl @ 140

Last change on this file since 140 was 76, checked in by pinsard, 16 years ago

no more NEMO reference in XSL files; project information (name and home page are in main.xml

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1<?xml version="1.0" encoding="iso-8859-1"?>
2<xsl:stylesheet
3version="1.0"
4xmlns:d="http://docbook.org/ns/docbook"
5xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
6
7<!--
8module :
9production d'un fichier de commande gnuplot avec données incorporées pour
10le graphe publications/année
11
12update :
13$Id$
14fplod 2008-04-30T06:50:45Z aedon.locean-ipsl.upmc.fr (Darwin)
15chgt for dbk5 in
16fplod 2007-05-21T12:52:07Z aedon.locean-ipsl.upmc.fr (Darwin)
17d'après /Users/pinsard/ES/src/estimation/src/estimation_graph1_gnuplot.xsl
18creation
19-->
20
21<xsl:output
22 method="text"
23 encoding="ISO-8859-1"
24 indent="yes"/>
25
26<xsl:include href="biblioentry_xml.xsl"/>
27
28<xsl:variable name="list_years" select="///d:pubdate[not( self::node() = following::d:pubdate )]"/>
29
30<xsl:template match="d:bibliography">
31#
32#  $ gnuplot graph1_<xsl:value-of select="years"/>.gnu
33#
34# source :
35# ++/graph1_<xsl:value-of select="years"/>.gnu
36#
37# update :
38# <xsl:value-of select="$makedate"/>
39#
40reset
41#
42# codage iso pour les diacritiques
43set encoding iso_8859_1
44#
45set size 1.0, 1.0
46set origin 0.0, 0.0
47#
48# pas de légendes
49set nokey
50#
51# definition of axes
52set xlabel "Year"
53set xdata time
54set timefmt "%Y"
55set format x "%Y"
56#++set xrange ++ year min year max
57set ylabel "Nb of publications"
58# titre sur le graphique
59set title "nb of publications by year date : <xsl:value-of select="$makedate"/>"
60#
61#set term svg dynamic
62#set output "years.svg"
63#++set output "fichier_svg"
64set term png
65set output "<xsl:value-of select="$path"/>/years.png"
66
67plot '-' using 1:2 with linespoints
68   <!-- loop on years -->
69   <xsl:for-each select="$list_years">
70    <xsl:sort order="ascending" data-type="number" select="."/>
71    <xsl:call-template name="one_year">
72     <xsl:with-param name="year" select="."/>
73    </xsl:call-template>
74   </xsl:for-each>
75   <xsl:text>e</xsl:text>
76   <xsl:text>&#xA;</xsl:text>
77</xsl:template>
78
79<xsl:template name="one_year">
80<xsl:param name="year"/>
81<xsl:value-of select="$year"/>
82<xsl:text> </xsl:text>
83<xsl:value-of select="count(/descendant::d:biblioentry[child::d:biblioset[child::d:pubdate=$year]]) "/>
84<xsl:text>&#xA;</xsl:text>
85</xsl:template>
86
87</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.