source: trunk/years_gnuplot.xsl @ 41

Last change on this file since 41 was 34, checked in by pinsard, 17 years ago

bug fix in phpversion.php; add fake user in demo1; suppression NEMO in title of plot

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