Пример #1
0
    def __init__(self,
                 scatterplot_structure,
                 graph_renderer,
                 scatterplot_width=500,
                 scatterplot_height=700,
                 d3_url_struct=None,
                 protocol='http',
                 template_file_name=None):
        ''',
        Parameters
        ----------
        scatterplot_structure: ScatterplotStructure
        graph_renderer: GraphRenderer
        scatterplot_width: int
        scatterplot_height: int
        d3_url_struct: D3URLs
        protocol: str
            http or https
        template_file_name: file name to use as template
        '''
        self.graph_renderer = graph_renderer
        self.scatterplot_structure = scatterplot_structure
        self.d3_url_struct = d3_url_struct if d3_url_struct else D3URLs()
        ExternalJSUtilts.ensure_valid_protocol(protocol)
        self.protocol = protocol

        self.scatterplot_width = scatterplot_width
        self.scatterplot_height = scatterplot_height

        self.template_file_name = GRAPH_VIZ_FILE_NAME if template_file_name is None else template_file_name
 def __init__(self,
              category_scatterplot_structure,
              term_scatterplot_structure,
              category_projection,
              category_width,
              category_height,
              include_category_labels=True,
              show_halo=True,
              num_terms=5,
              d3_url_struct=None,
              x_dim=0,
              y_dim=1,
              protocol='http',
              term_plot_interface='termPlotInterface',
              category_plot_interface='categoryPlotInterface'):
     ''',
     Parameters
     ----------
     category_scatterplot_structure: ScatterplotStructure
     term_scatterplot_structure: ScatterplotStructure,
     category_projection: CategoryProjection
     category_height: int
     category_width: int
     show_halo: bool
     num_terms: int, default 5
     include_category_labels: bool, default True
     d3_url_struct: D3URLs
     x_dim: int, 0
     y_dim: int, 1
     protocol: str
         http or https
     term_plot_interface : str
     category_plot_interface : str
     '''
     self.category_scatterplot_structure = category_scatterplot_structure
     self.term_scatterplot_structure = term_scatterplot_structure
     assert issubclass(type(category_projection), CategoryProjectionBase)
     self.category_projection = category_projection
     self.d3_url_struct = d3_url_struct if d3_url_struct else D3URLs()
     ExternalJSUtilts.ensure_valid_protocol(protocol)
     self.protocol = protocol
     self.category_width = category_width
     self.category_height = category_height
     self.num_terms = num_terms
     self.show_halo = show_halo
     self.x_dim = x_dim
     self.y_dim = y_dim
     self.include_category_labels = include_category_labels
     self.term_plot_interface = term_plot_interface
     self.category_plot_interface = category_plot_interface
 def __init__(self,
              category_scatterplot_structure,
              term_scatterplot_structure,
              category_projection,
              category_width,
              category_height,
              include_category_labels=True,
              show_halo=True,
              num_terms=5,
              d3_url_struct=None,
              x_dim=0,
              y_dim=1,
              protocol='http',
              term_plot_interface='termPlotInterface',
              category_plot_interface='categoryPlotInterface'):
     ''',
     Parameters
     ----------
     category_scatterplot_structure: ScatterplotStructure
     term_scatterplot_structure: ScatterplotStructure,
     category_projection: CategoryProjection
     category_height: int
     category_width: int
     show_halo: bool
     num_terms: int, default 5
     include_category_labels: bool, default True
     d3_url_struct: D3URLs
     x_dim: int, 0
     y_dim: int, 1
     protocol: str
         http or https
     term_plot_interface : str
     category_plot_interface : str
     '''
     self.category_scatterplot_structure = category_scatterplot_structure
     self.term_scatterplot_structure = term_scatterplot_structure
     assert issubclass(type(category_projection), CategoryProjectionBase)
     self.category_projection = category_projection
     self.d3_url_struct = d3_url_struct if d3_url_struct else D3URLs()
     ExternalJSUtilts.ensure_valid_protocol(protocol)
     self.protocol = protocol
     self.category_width = category_width
     self.category_height = category_height
     self.num_terms = num_terms
     self.show_halo = show_halo
     self.x_dim = x_dim
     self.y_dim = y_dim
     self.include_category_labels = include_category_labels
     self.term_plot_interface = term_plot_interface
     self.category_plot_interface = category_plot_interface