hloopy/plotters.py
def plot(self, simple_label=False, extract_plot_kwargs={}, 
             ostring='nwes', **kwargs):
        """Plot the HLoops on a grid.

        Args:
            - ostring (string): A four character string that determines the
                orientation transformation applied. Letters correspond to
                cardinal directions n, e, s, w. The first two characters
                are the location of (0, 0), the third character is the +x
                direction and the fourth character is the +y direction. The
                x and y reffered to are that of typical computer image 
                coordinates. Top left is (0, 0), +x is to the right and +y is
                down. The default orientation is 'nwes'.
            - extract_plot_kwargs (dict): kwargs for pyplot.plot when used to
                plot any extracts that may have been added.
            - kwargs: passed to pyplot.plot call that plots the HLoop data.
        """
        ostring = ostring.lower()
        final_nrows, final_ncols = self.rotated_shape(ostring, self.nrows, 
                                                      self.ncols)
        self.fig, self.axarr = plt.subplots(nrows=final_nrows, 
                                            ncols=final_ncols)
        if self.hideaxes_switch:
            self.hideaxes(self.axarr)
        self.extract_instances = defaultdict(list)
        self.plotted_lines = []
        for i, hl in enumerate(self.hloops):
            # Plot hloop
            row_init, col_init = self.hg.mapping[i]
            row, col = self.rotated_indices(row_init, col_init, self.nrows, 
                                            self.ncols, ostring)
            ax = self.axarr[row][col]
            self.plotted_lines.append(hl.plot(ax, **kwargs))
            # Maybe add a title
            title_style = {'fontsize': 12}
            title_style.update(self.titleparams)
            if self.lablevel is not None:
                title = self._title_from(hl.fpath, level=self.lablevel,
                                         maxchars=20, ellipsis=True)
                ax.set_title(title, **title_style)
            if simple_label:
                ax.set_title('{}, {}'.format(col_init, row_init), 
                             **title_style)
            # Plot extracts
            for e in self.extracts:
                e_instance = e(hl)
                e_instance.plot(ax, **extract_plot_kwargs)
                self.extract_instances[hl.fpath].append(e_instance)
            # Maybe add a legend
            if i == 0 and self.legend:
                try:
                    ax.legend(**self.legend)
                except TypeError:
                    ax.legend()
        return self.plotted_lines
Plot the HLoops on a grid.

        Args:
            - ostring (string): A four character string that determines the
                orientation transformation applied. Letters correspond to
                cardinal directions n, e, s, w. The first two characters
                are the location of (0, 0), the third character is the +x
                direction and the fourth character is the +y direction. The
                x and y reffered to are that of typical computer image 
                coordinates. Top left is (0, 0), +x is to the right and +y is
                down. The default orientation is 'nwes'.
            - extract_plot_kwargs (dict): kwargs for pyplot.plot when used to
                plot any extracts that may have been added.
            - kwargs: passed to pyplot.plot call that plots the HLoop data.
        
Plot the HLoops on a grid.
Plot the HLoops on a grid .
def plot(self, simple_label=False, extract_plot_kwargs={}, 
             ostring='nwes', **kwargs):
        ostring = ostring.lower()
        final_nrows, final_ncols = self.rotated_shape(ostring, self.nrows, 
                                                      self.ncols)
        self.fig, self.axarr = plt.subplots(nrows=final_nrows, 
                                            ncols=final_ncols)
        if self.hideaxes_switch:
            self.hideaxes(self.axarr)
        self.extract_instances = defaultdict(list)
        self.plotted_lines = []
        for i, hl in enumerate(self.hloops):
            row_init, col_init = self.hg.mapping[i]
            row, col = self.rotated_indices(row_init, col_init, self.nrows, 
                                            self.ncols, ostring)
            ax = self.axarr[row][col]
            self.plotted_lines.append(hl.plot(ax, **kwargs))
            title_style = {'fontsize': 12}
            title_style.update(self.titleparams)
            if self.lablevel is not None:
                title = self._title_from(hl.fpath, level=self.lablevel,
                                         maxchars=20, ellipsis=True)
                ax.set_title(title, **title_style)
            if simple_label:
                ax.set_title('{}, {}'.format(col_init, row_init), 
                             **title_style)
            for e in self.extracts:
                e_instance = e(hl)
                e_instance.plot(ax, **extract_plot_kwargs)
                self.extract_instances[hl.fpath].append(e_instance)
            if i == 0 and self.legend:
                try:
                    ax.legend(**self.legend)
                except TypeError:
                    ax.legend()
        return self.plotted_lines
def plot ( self , simple_label = False , extract_plot_kwargs = { } , ostring = 'nwes' , ** kwargs ) : ostring = ostring . lower ( ) final_nrows , final_ncols = self . rotated_shape ( ostring , self . nrows , self . ncols ) self . fig , self . axarr = plt . subplots ( nrows = final_nrows , ncols = final_ncols ) if self . hideaxes_switch : self . hideaxes ( self . axarr ) self . extract_instances = defaultdict ( list ) self . plotted_lines = [ ] for i , hl in enumerate ( self . hloops ) : row_init , col_init = self . hg . mapping [ i ] row , col = self . rotated_indices ( row_init , col_init , self . nrows , self . ncols , ostring ) ax = self . axarr [ row ] [ col ] self . plotted_lines . append ( hl . plot ( ax , ** kwargs ) ) title_style = { 'fontsize' : 12 } title_style . update ( self . titleparams ) if self . lablevel is not None : title = self . _title_from ( hl . fpath , level = self . lablevel , maxchars = 20 , ellipsis = True ) ax . set_title ( title , ** title_style ) if simple_label : ax . set_title ( '{}, {}' . format ( col_init , row_init ) , ** title_style ) for e in self . extracts : e_instance = e ( hl ) e_instance . plot ( ax , ** extract_plot_kwargs ) self . extract_instances [ hl . fpath ] . append ( e_instance ) if i == 0 and self . legend : try : ax . legend ( ** self . legend ) except TypeError : ax . legend ( ) return self . plotted_lines
Plot the HLoops on a grid.
Plot the HLoops on a grid .
"""Plot the HLoops on a grid.

        Args:
            - ostring (string): A four character string that determines the
                orientation transformation applied. Letters correspond to
                cardinal directions n, e, s, w. The first two characters
                are the location of (0, 0), the third character is the +x
                direction and the fourth character is the +y direction. The
                x and y reffered to are that of typical computer image 
                coordinates. Top left is (0, 0), +x is to the right and +y is
                down. The default orientation is 'nwes'.
            - extract_plot_kwargs (dict): kwargs for pyplot.plot when used to
                plot any extracts that may have been added.
            - kwargs: passed to pyplot.plot call that plots the HLoop data.
        """ # Plot hloop # Maybe add a title # Plot extracts # Maybe add a legend
self
simple_label
extract_plot_kwargs
ostring
- ostring
A four character string that determines the
orientation transformation applied. Letters correspond to
cardinal directions n, e, s, w. The first two characters
are the location of (0, 0), the third character is the +x
direction and the fourth character is the +y direction. The
x and y reffered to are that of typical computer image
coordinates. Top left is (0, 0), +x is to the right and +y is
down. The default orientation is 'nwes'.
A four character string that determines the orientation transformation applied . Letters correspond to cardinal directions n e s w . The first two characters are the location of ( 0 0 ) the third character is the + x direction and the fourth character is the + y direction . The x and y reffered to are that of typical computer image coordinates . Top left is ( 0 0 ) + x is to the right and + y is down . The default orientation is ' nwes ' .
- extract_plot_kwargs
kwargs for pyplot.plot when used to
plot any extracts that may have been added.
kwargs for pyplot . plot when used to plot any extracts that may have been added .
- kwargs
passed to pyplot.plot call that plots the HLoop data.
passed to pyplot . plot call that plots the HLoop data .