source: trunk/years_gnuplot.xsl @ 7

Last change on this file since 7 was 2, checked in by smasson, 17 years ago

initial import

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