Exemple #1
0
 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)
Exemple #2
0
 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)
Exemple #3
0
 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)
Exemple #4
0
 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)
Exemple #5
0
 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)
Exemple #6
0
 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')
Exemple #7
0
 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)