Commit 814a13d7 authored by Michele Maris's avatar Michele Maris
Browse files

u

parent 68c97646
Loading
Loading
Loading
Loading
+30 −14
Original line number Diff line number Diff line
@@ -340,36 +340,52 @@ class StandardFig() :
        labs = [l.get_label() for l in lns]
        self._handle['legend']=ax1.legend(lns, labs,ncol=ncol,loc=loc,fontsize=self.fontsize_legend if fontsize is None else fontsize,title=title,title_fontsize=fslt)
        return self._handle['legend']
    def title(self,txt,fontsize=None) :
    def title(self,txt,fontsize=None,color=None) :
        from matplotlib import pyplot as plt
        lk='title'
        fs=self.fontsize_title if fontsize is None else fontsize
        self._handle['title']=plt.title(txt,fontsize=fs)
        return self._handle['title']
    def suptitle(self,txt,fontsize=None) :
        self._handle[lk]=plt.title(txt,fontsize=fs)
        if not color is None :
           self._handle[lk].set_color(color)
        return self._handle[lk]
    def suptitle(self,txt,fontsize=None,color=None) :
        from matplotlib import pyplot as plt
        lk='suptitle'
        fs=self.fontsize_title if fontsize is None else fontsize
        self._handle['suptitle']=plt.suptitle(txt,fontsize=fs)
        return self._handle['suptitle']
    def xlabel(self,txt,fontsize=None) :
        self._handle[lk]=plt.suptitle(txt,fontsize=fs)
        if not color is None :
           self._handle[lk].set_color(color)
        return self._handle[lk]
    def xlabel(self,txt,fontsize=None,color=None) :
        from matplotlib import pyplot as plt
        lk='xlabel'
        fs=self.fontsize_xylabels if fontsize is None else fontsize
        self._handle['xlabel']=plt.xlabel(txt,fontsize=fs)
        return self._handle['xlabel']
    def ylabel(self,txt,fontsize=None) :
        self._handle[lk]=plt.xlabel(txt,fontsize=fs)
        if not color is None :
           self._handle[lk].set_color(color)
        return self._handle[lk]
    def ylabel(self,txt,fontsize=None,color=None) :
        from matplotlib import pyplot as plt
        lk='ylabel'
        fs=self.fontsize_xylabels if fontsize is None else fontsize
        self._handle['ylabel']=plt.ylabel(txt,fontsize=fs)
        return self._handle['ylabel']
    def XTICKS(self,ax=None,fontsize=None) :
        self._handle[lk]=plt.ylabel(txt,fontsize=fs)
        if not color is None :
           self._handle[lk].set_color(color)
        return self._handle[lk]
    def XTICKS(self,ax=None,fontsize=None,color=None) :
        from matplotlib import pyplot as plt
        fs=self.fontsize_ticks if fontsize is None else fontsize
        aa=plt.gca().get_xticklabels() if ax is None else ax.get_xticklabels()
        for k in aa : k.set_fontsize(fs)
    def YTICKS(self,ax=None,fontsize=None) :
        if not color is None :
           for k in aa : k.set_color(color)
    def YTICKS(self,ax=None,fontsize=None,color=None) :
        from matplotlib import pyplot as plt
        fs=self.fontsize_ticks if fontsize is None else fontsize
        aa=plt.gca().get_yticklabels() if ax is None else ax.get_yticklabels()
        for k in aa : k.set_fontsize(fs)
        if not color is None :
           for k in aa : k.set_color(color)
    def gridspec(self,nrows,ncols,**kargs) :
        """ generates a GridSpec array. See matplotlib.gridspec.GridSpec """
        import matplotlib.gridspec as gridspec