def setUpClass(cls): cls.d = { 'temperature': [1, 2], 'doping': [10, 100], 'zt': [[1, 2], [4, 8]] } cls.fig, cls.ax = one_colourbar() cls.ax, cls.cbar = heatmap.add_ztmap(cls.ax, cls.d)
def test_colour(self): colours = ['#ff0000', '#00ff00'] self.fig, self.ax = one_colourbar() self.ax, self.cbar = heatmap.add_heatmap(self.ax, self.x, self.y, self.c, xinterp=5, yinterp=5, colour=colours)
def test_colourmap(self): cmap = mpl.cm.get_cmap('viridis') self.fig, self.ax = one_colourbar() self.ax, self.cbar = heatmap.add_heatmap(self.ax, self.x, self.y, self.c, xinterp=5, yinterp=5, colour=cmap)
def setUpClass(cls): cls.x = [2, 4, 6] cls.y = [4, 8, 12] cls.c = [[2, 4, 6], [6, 8, 10], [10, 12, 14]] cls.fig, cls.ax = one_colourbar() cls.ax, cls.cbar = heatmap.add_heatmap(cls.ax, cls.x, cls.y, cls.c, xinterp=5, yinterp=5)
def setUpClass(cls): cls.x = [1e2, 1e4, 1e6] cls.y = [1e4, 1e8, 1e12] cls.c = [[1e2, 1e4, 1e6], [1e6, 1e8, 1e10], [1e10, 1e12, 1e14]] cls.fig, cls.ax = one_colourbar() cls.ax, cls.cbar = heatmap.add_heatmap(cls.ax, cls.x, cls.y, cls.c, xscale='log', yscale='log', cscale='log', xinterp=5, yinterp=5)
def setUpClass(cls): c = [[[[2.]], [[4.]]], [[[8.]], [[16.]]]] s = [[[[3e6]], [[6e6]]], [[[9e6]], [[12e6]]]] etc = [[[[3.]], [[3.]]], [[[3.]], [[3.]]]] ltc = [[6.], [6.]] t = [2., 4.] d = [10., 100.] cls.d = { 'conductivity': c, 'seebeck': s, 'electronic_thermal_conductivity': etc, 'lattice_thermal_conductivity': ltc, 'temperature': t, 'doping': d, 'meta': { 'units': {} } } cls.fig, cls.ax = one_colourbar() cls.ax, cls.cbar = heatmap.add_ztmap(cls.ax, cls.d, direction='x')
def setUpClass(cls): cls.x = [1, 2, 3, 4] cls.y = [2, 4, 6, 8] cls.c = [[1, 2, 3], [2, 4, 6], [3, 6, 9]] cls.fig, cls.ax = one_colourbar() cls.ax, cls.cbar = heatmap.add_heatmap(cls.ax, cls.x, cls.y, cls.c)