Ignore:
Timestamp:
Sep 21, 2012, 5:11:37 PM (12 years ago)
Author:
aslmd
Message:

UTIL PYTHON : a working version of MCD python on an Apache server thanks to F. Guyon and L. Fairhead. plus added specific functions in mcd.py to make plots without using GUI, it was necessary to rewrite some stuff to avoid calling to matplotlib.pyplot.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UTIL/PYTHON/mcd/gale.py

    r761 r793  
    11#! /usr/bin/env python
     2
     3#import sys
     4#
     5#class NullDevice():
     6#    def write(self, s):
     7#        pass
     8#
     9#original_stdout = sys.stdout  # keep a reference to STDOUT
     10#
     11#sys.stdout = NullDevice()  # redirect the real STDOUT
     12#sys.stderr = NullDevice()  # redirect the real STDOUT
    213
    314from mcd import mcd
     
    1829#gale.printextvar("rho")
    1930
    20 #gale.seasonal()
    21 #gale.plot1d(["tsurf","u","v"])
     31gale.seasonal()
     32gale.plot1d(["tsurf","u","v"])
     33
     34import matplotlib.pyplot as mpl
     35mpl.savefig("temp.png",dpi=85,bbox_inches='tight',pad_inches=0.25)
     36
    2237
    2338#gale.xdate = 270.
     
    2540#gale.plot1d(["u","v"])
    2641
    27 #gale.latlon()
    28 #gale.map2d("tsurf")
     42gale.latlon()
     43gale.map2d("tsurf")
    2944
    3045import matplotlib.pyplot as mpl
    31 mpl.show()
     46#mpl.show()
     47mpl.savefig("img/temp.png",dpi=110,bbox_inches='tight',pad_inches=0.4)
Note: See TracChangeset for help on using the changeset viewer.