Ejemplo n.º 1
0
    def test_distribplot_lines_normalized_data1(self):
        '''Check plot data agrees with LaminateModel data; normalized=True.

        Compares lists of zipped (x,y) datapoints.

        Notes
        -----
        - Supports normalize triggering; normalized=True|False
        - Supports non-fixed extrema, i.e p>=2; extrema=False.
        - Supports multiple ps, cases, geo_strings

        '''
        # DEV: change parameters
        #cases_ = self.case1
        #cases_ = self.cases2
        cases_ = self.cases3

        # Compare plot data with LaminateModel data
        line_df_case = upt.extract_plot_LM_xy(cases_, normalized=True, extrema=False)
        line_data, df_data = line_df_case

        actual = line_data
        expected = df_data
        nt.assert_equal(actual, expected)

        plt.close()                                     # in jupyter, cuts out last plot
Ejemplo n.º 2
0
def test_extract_equivalence4():
    '''Given a case, line plot data agrees with the DataFrame data; {extrema,normalized}=False.'''

    case = ut.laminator(['400-[200]-800'])                 # unnormalized multiplot requires only one geoemetry
    line_df_case = upt.extract_plot_LM_xy(case, extrema=False, normalized=False)
    line_data, df_data = line_df_case

    actual = line_data
    expected = df_data
    nt.assert_equal(actual, expected)
Ejemplo n.º 3
0
def test_extract_equivalence2():
    '''Given a case, line plot data agrees with the DataFrame data; extrema=True.'''

    case = ut.laminator(['400-[200]-800', '400-[400]-400'])
    line_df_case = upt.extract_plot_LM_xy(case, extrema=True)
    line_data, df_data = line_df_case

    actual = line_data
    expected = df_data
    nt.assert_equal(actual, expected)