Changeset 149


Ignore:
Timestamp:
02/28/12 12:58:55 (12 years ago)
Author:
pinsard
Message:

try to rehab. gnuplot but uggly

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/makefile

    r148 r149  
    1 # module : 
     1#+ 
     2# 
     3# DESCRIPTION 
     4# =========== 
     5# 
    26# génération des pages superbib 
    37# 
     
    6872# creation 
    6973# 
     74#- 
    7075PRODUCT = \ 
    7176superbib 
     
    484489 
    485490$(DIRWWW)/images/years.png : \ 
    486 $(DIRTMP)/years.ploticus 
    487         @pl -o $@ png $< 
     491$(DIRTMP)/years.ploticus \ 
     492$(DIRTMP)/years_gnuplot.gnu 
     493        @gnuplot years_gnuplot.gnu 
     494        @pl -o $@ png $<         
     495 
     496$(DIRTMP)/years_gnuplot.gnu : \ 
     497$(DIRTMP)/biblio.xml \ 
     498$(DIRSRC)/years_gnuplot.xsl \ 
     499$(DIRSRC)/biblioentry_xml.xsl \ 
     500$(DIRSRC)/message_lang.xsl 
     501        @xsltproc \ 
     502        --param makedate "'$(MAKEDATE)'" \ 
     503        --param path "'$(DIRTMP)'" \ 
     504        --output $@ \ 
     505        $(DIRSRC)/years_gnuplot.xsl \ 
     506        $< 
    488507 
    489508$(DIRTMP)/years.ploticus : \ 
  • trunk/years_gnuplot.xsl

    r76 r149  
    66 
    77<!-- 
    8 module : 
     8.. _year_gnuplot.xsl: 
     9 
     10DESCRIPTION 
     11=========== 
     12 
    913production d'un fichier de commande gnuplot avec données incorporées pour 
    1014le graphe publications/année 
    1115 
    12 update : 
     16TODO 
     17==== 
     18 
     19understand message "avoid all points y value undefined" 
     20when this line is process:: 
     21 
     22  set xrange [<xsl:value-of select="$yyyy_min"/>:<xsl:value-of select="$yyyy_max"/>] 
     23 
     24EVOLUTIONS 
     25========== 
     26 
    1327$Id$ 
    14 fplod 2008-04-30T06:50:45Z aedon.locean-ipsl.upmc.fr (Darwin) 
    15 chgt for dbk5 in 
    16 fplod 2007-05-21T12:52:07Z aedon.locean-ipsl.upmc.fr (Darwin) 
    17 d'après /Users/pinsard/ES/src/estimation/src/estimation_graph1_gnuplot.xsl 
    18 creation 
     28 
     29$URL$ 
     30 
     31- fplod 20120228 
     32 
     33  * rewrite ReST header 
     34  * remove svg stuff 
     35  * add min and max year computation thanks to 
     36    http://www.dpawson.co.uk/xsl/sect2/N5121.html#d6617e433 max(), min() and avg() functions 
     37    but not used because of gnuplot issue 
     38 
     39- fplod 2008-04-30T06:50:45Z aedon.locean-ipsl.upmc.fr (Darwin) 
     40 
     41  * chgt for dbk5 in 
     42 
     43- fplod 2007-05-21T12:52:07Z aedon.locean-ipsl.upmc.fr (Darwin) 
     44 
     45  * creation 
     46    d'après /Users/pinsard/ES/src/estimation/src/estimation_graph1_gnuplot.xsl 
     47 
    1948--> 
    2049 
     
    2857<xsl:variable name="list_years" select="///d:pubdate[not( self::node() = following::d:pubdate )]"/> 
    2958 
     59<xsl:variable name="yyyy_max"> 
     60     <xsl:for-each select="$list_years"> 
     61       <xsl:sort data-type="number" order="descending"/> 
     62       <xsl:if test="position()=1"> 
     63          <xsl:value-of select="."/> 
     64       </xsl:if> 
     65     </xsl:for-each> 
     66</xsl:variable> 
     67 
     68<xsl:variable name="yyyy_min"> 
     69     <xsl:for-each select="$list_years"> 
     70       <xsl:sort data-type="number" order="ascending"/> 
     71       <xsl:if test="position()=1"> 
     72          <xsl:value-of select="."/> 
     73       </xsl:if> 
     74     </xsl:for-each> 
     75</xsl:variable> 
     76 
    3077<xsl:template match="d:bibliography"> 
     78#+ 
     79# .. _years_gnuplot.gnu: 
    3180# 
    32 #  $ gnuplot graph1_<xsl:value-of select="years"/>.gnu 
     81# DESCRIPTION 
     82# =========== 
    3383# 
    34 # source : 
    35 # ++/graph1_<xsl:value-of select="years"/>.gnu 
     84# EXAMPLES 
     85# ======== 
    3686# 
    37 # update : 
    38 # <xsl:value-of select="$makedate"/> 
     87# ::  
    3988# 
     89#  $ gnuplot years_gnuplot.gnu 
     90# 
     91# EVOLUTIONS 
     92# =========== 
     93# 
     94# - <xsl:value-of select="$makedate"/> 
     95# 
     96#   * created by :ref:`years_gnuplot.xsl` 
     97# 
     98#- 
    4099reset 
    41100# 
     
    54113set timefmt "%Y" 
    55114set format x "%Y" 
    56 #++set xrange ++ year min year max 
     115#set xrange [<xsl:value-of select="$yyyy_min"/>:<xsl:value-of select="$yyyy_max"/>] # commented to understand message "avoid all points y value undefined" 
     116set xrange [*:*] 
     117set yrange [*:*] 
    57118set ylabel "Nb of publications" 
    58119# titre sur le graphique 
    59120set title "nb of publications by year date : <xsl:value-of select="$makedate"/>" 
    60121# 
    61 #set term svg dynamic 
    62 #set output "years.svg" 
    63 #++set output "fichier_svg" 
    64122set term png 
    65123set output "<xsl:value-of select="$path"/>/years.png" 
    66124 
    67 plot '-' using 1:2 with linespoints 
     125plot '-' using 1:2 with lines 
    68126   <!-- loop on years --> 
    69127   <xsl:for-each select="$list_years"> 
     
    77135</xsl:template> 
    78136 
     137<xsl:template name="one_yearcount"> 
     138<xsl:param name="year"/> 
     139<xsl:value-of select="count(/descendant::d:biblioentry[child::d:biblioset[child::d:pubdate=$year]]) "/> 
     140<xsl:text> </xsl:text> 
     141</xsl:template> 
     142 
    79143<xsl:template name="one_year"> 
    80144<xsl:param name="year"/> 
Note: See TracChangeset for help on using the changeset viewer.