コード例 #1
0
 def add_hist_stats(self, ax):
     box_text = AreaDifferences.HIST_TEXT.format(
         self.raster_difference.mad.median,
         self.raster_difference.mad.normalized(),
         self.raster_difference.mad.standard_deviation(),
         self.raster_difference.mad.standard_deviation(2),
     )
     PlotBase.add_to_legend(ax, box_text)
コード例 #2
0
ファイル: histograms.py プロジェクト: dlforrister/snow-aso
    def render_elevation(self, ax1, ax2, ax3, mean):
        ax1.set_title('Elevation distribution', **PlotBase.title_opts())
        ax1.set_ylabel('Count', **PlotBase.label_opts())
        Histogram.show_mean(ax1, self.lidar.elevation.mean())

        ax2.set_title('Elevation distribution', **PlotBase.title_opts())
        ax2.set_ylabel('Count', **PlotBase.label_opts())
        Histogram.show_mean(ax2, self.sfm.elevation.mean())

        ax3.set_title('Differences per elevation in 10 m intervals',
                      **PlotBase.title_opts())
        ax3.set_ylabel('Percent', **PlotBase.label_opts())
        ax3.set_xlabel('Elevation', **PlotBase.label_opts())
        PlotBase.add_to_legend(ax3, self.BOX_TEXT.format(mean.round(4)))
コード例 #3
0
ファイル: histograms.py プロジェクト: dlforrister/snow-aso
    def render_aspect(self, ax1, ax2, ax3, mean):
        ax1.set_title('Aspect distribution', **PlotBase.title_opts())
        ax1.set_ylabel('Count', **PlotBase.label_opts())
        Histogram.show_mean(ax1, self.lidar.aspect.mean())

        ax2.set_title('Aspect distribution', **PlotBase.title_opts())
        ax2.set_ylabel('Count', **PlotBase.label_opts())
        Histogram.show_mean(ax2, self.sfm.aspect.mean())

        ax3.set_title('Differences per aspect angle in 10 degree intervals',
                      **PlotBase.title_opts())
        ax3.set_ylabel('Percent', **PlotBase.label_opts())
        ax3.set_xlabel('Degree', **PlotBase.label_opts())
        PlotBase.add_to_legend(ax3, self.BOX_TEXT.format(mean.round(2)))
コード例 #4
0
 def add_box_plot_stats(self, ax, box_plot_data):
     text = [
         self.BOX_PLOT_TEXT.format(
             str(self.BOX_PLOT_WHISKERS[1]) + '%',
             box_plot_data['caps'][1].get_ydata()[0]),
         self.BOX_PLOT_TEXT.format(
             'Upper Q3', box_plot_data['whiskers'][1].get_ydata()[0]),
         self.BOX_PLOT_TEXT.format(
             'Median', box_plot_data['medians'][0].get_ydata()[0]),
         self.BOX_PLOT_TEXT.format(
             'Lower Q2', box_plot_data['whiskers'][0].get_ydata()[0]),
         self.BOX_PLOT_TEXT.format(
             str(self.BOX_PLOT_WHISKERS[0]) + '%',
             box_plot_data['caps'][0].get_ydata()[0]),
     ]
     PlotBase.add_to_legend(ax,
                            '\n'.join(text),
                            handlelength=0,
                            handletextpad=0)
コード例 #5
0
ファイル: histograms.py プロジェクト: dlforrister/snow-aso
 def show_mean(ax, value):
     ax.axvline(value, color='orange', linewidth=2)
     PlotBase.add_to_legend(ax, Histogram.BOX_TEXT.format(value.round(2)))