Changeset 150


Ignore:
Timestamp:
02/28/12 14:04:10 (12 years ago)
Author:
pinsard
Message:

first usage of matplotlib

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/makefile

    r149 r150  
    66# génération des pages superbib 
    77# 
     8# TODO 
     9# ==== 
     10# 
     11# ask for end-user graphic tool 
     12# 
    813# EVOLUTIONS 
    914# ========== 
     
    1520# - fplod 20120228 
    1621# 
     22#   * matplotlib ok on halios even if the image is too large 
     23#   * gnuplot process is also done but not use (to uggly) 
    1724#   * ploticus command is now (version 2.41) pl 
    1825# 
     
    227234        -@rm -f $(DIRTMP)/years_gnuplot.gnu 
    228235        -@rm -f $(DIRTMP)/years.ploticus 
     236        -@rm -f $(DIRTMP)/years_matplotlib.py 
    229237        -@rm -f $(DIRTMP)/years.png 
    230238        -@rm -f $(DIRTMP)/$(PRODUCT)02.xml 
     
    490498$(DIRWWW)/images/years.png : \ 
    491499$(DIRTMP)/years.ploticus \ 
    492 $(DIRTMP)/years_gnuplot.gnu 
     500$(DIRTMP)/years_gnuplot.gnu \ 
     501$(DIRTMP)/years_matplotlib.py 
    493502        @gnuplot years_gnuplot.gnu 
    494503        @pl -o $@ png $<         
     504        @python years_matplotlib.py 
     505 
     506$(DIRTMP)/years_matplotlib.py : \ 
     507$(DIRTMP)/biblio.xml \ 
     508$(DIRSRC)/years_matplotlib.xsl \ 
     509$(DIRSRC)/biblioentry_xml.xsl \ 
     510$(DIRSRC)/message_lang.xsl 
     511        @xsltproc \ 
     512        --param makedate "'$(MAKEDATE)'" \ 
     513        --param path "'$(DIRWWW)/images/'" \ 
     514        --output $@ \ 
     515        $(DIRSRC)/years_matplotlib.xsl \ 
     516        $< 
    495517 
    496518$(DIRTMP)/years_gnuplot.gnu : \ 
     
    501523        @xsltproc \ 
    502524        --param makedate "'$(MAKEDATE)'" \ 
    503         --param path "'$(DIRTMP)'" \ 
     525        --param path "'$(DIRWWW)/images/'" \ 
    504526        --output $@ \ 
    505527        $(DIRSRC)/years_gnuplot.xsl \ 
  • trunk/tests/demo1.sh

    • Property svn:executable set to *
  • trunk/tests/demo2.sh

    • Property svn:executable set to *
  • trunk/years_matplotlib.xsl

    r113 r150  
    3131see http://matplotlib.sourceforge.net/examples/pylab_examples/demo_ribbon_box.html 
    3232 
     33doctest 
     34 
    3335EVOLUTIONS 
    3436========== 
    3537 
    3638$Id$ 
     39 
    3740$URL$ 
     41 
     42- fplod 20120228 
     43 
     44  * add yticks and ylim 
     45  * remove plot_shox to avoid interaction 
    3846 
    3947- fplod 20110627T144044Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    6068:: 
    6169 
    62   $ python graph1_<xsl:value-of select="years"/>.py 
     70  $ python years_matplotlib.py 
    6371 
    6472 
     
    94102   </xsl:for-each> 
    95103 
     104ax.set_ylim(min(values)-1, max(values)+1) 
    96105ax.set_xlim(dates[0]-0.5, dates[-1]+0.5) 
     106plot.yticks(np.arange(min(values)-1,max(values)+1,1)) 
    97107plot.bar(dates, values,width=0.5) 
    98108 
     
    101111# 
    102112fig.savefig('<xsl:value-of select="$path"/>/years.png') 
    103  
    104 plot.show() 
    105113 
    106114</xsl:template> 
Note: See TracChangeset for help on using the changeset viewer.