示例#1
0
    def test_make_interactive_scatter(self):
        """make_interactive_scatter: creates HTML source for interactive \
images"""

        filename1 = '/tmp/PC1_vs_PC2_plot.png'
        filename2 = '/tmp/PC1vsPC2plot.eps.gz'

        self._paths_to_clean_up = [filename1, filename2]

        obs1, obs2, obs3 = make_interactive_scatter(self.plot_label,
                                                    self.dir_path,
                                                    self.data_file_link,
                                                    self.background_color,
                                                    self.label_color,
                                                    None,
                                                    self.alpha,
                                                    self.xy_coords,
                                                    self.props,
                                                    self.x_len,
                                                    self.y_len,
                                                    self.size,
                                                    draw_axes=False,
                                                    generate_eps=True)

        self.assertEqual(self.remove_nums(obs1), self.remove_nums(expsrcmap1))
        self.assertEqual(self.remove_nums(obs2), self.remove_nums(expimgmap1))
        self.assertEqual(self.remove_nums(obs3), self.remove_nums(expeps1))
        self.assertTrue(
            exists(filename1), 'The png file was not created in \
the appropriate location')
        self.assertTrue(
            exists(filename2), 'The eps file was not created in \
the appropriate location')
示例#2
0
    def test_make_interactive_scatter(self):
        """make_interactive_scatter: creates HTML source for interactive \
images"""

        filename1='/tmp/PC1_vs_PC2_plot.png'
        filename2='/tmp/PC1vsPC2plot.eps.gz'

        self._paths_to_clean_up = [filename1,filename2]

        obs1,obs2,obs3=make_interactive_scatter(self.plot_label,self.dir_path,
                                self.data_file_link,self.background_color,
                                self.label_color,None,self.alpha, 
                                self.xy_coords,self.props, 
                                self.x_len, self.y_len, self.size,
                                draw_axes=False, generate_eps=True)

        self.assertEqual(obs1,expsrcmap1)
        self.assertEqual(obs2,expimgmap1)
        self.assertEqual(obs3,expeps1)
        self.assertTrue(exists(filename1),'The png file was not created in \
the appropriate location')
        self.assertTrue(exists(filename2),'The eps file was not created in \
the appropriate location')