Beispiel #1
0
 def test_xy_cube(self):
     c = simple_1d()
     qplt.plot(c)
     ax = qplt.plt.gca()
     x = ax.xaxis.get_label().get_text()
     self.assertEqual(x, "Foo")
     y = ax.yaxis.get_label().get_text()
     self.assertEqual(y, "Thingness")
Beispiel #2
0
 def test_yx_cube(self):
     c = simple_1d()
     c.transpose()
     # Making the cube a vertical coordinate should change the default
     # orientation of the plot.
     c.coord("foo").attributes["positive"] = "up"
     qplt.plot(c)
     ax = qplt.plt.gca()
     x = ax.xaxis.get_label().get_text()
     self.assertEqual(x, "Thingness")
     y = ax.yaxis.get_label().get_text()
     self.assertEqual(y, "Foo")
 def test_argument_is_wrong_type(self):
     cube_a = stock.simple_1d()
     with self.assertRaises(TypeError):
         demote_dim_coord_to_aux_coord(cube_a, 0.0)