Example #1
0
  def __init__(self, scene, settings=None):
    import matplotlib
    matplotlib.use('Agg')
    from matplotlib import pyplot
    render_2d.__init__(self, scene, settings)

    self._open_circle_points = flex.vec2_double()
    self._open_circle_radii = []
    self._open_circle_colors = []
    self._filled_circle_points = flex.vec2_double()
    self._filled_circle_radii = []
    self._filled_circle_colors = []

    self.fig, self.ax = pyplot.subplots(figsize=self.settings.size_inches)
    self.render(self.ax)
Example #2
0
    def __init__(self, scene, settings=None):
        import matplotlib
        matplotlib.use('Agg')
        from matplotlib import pyplot
        render_2d.__init__(self, scene, settings)

        self._open_circle_points = flex.vec2_double()
        self._open_circle_radii = []
        self._open_circle_colors = []
        self._filled_circle_points = flex.vec2_double()
        self._filled_circle_radii = []
        self._filled_circle_colors = []

        self.fig, self.ax = pyplot.subplots(figsize=self.settings.size_inches)
        self.render(self.ax)
        pyplot.close()
Example #3
0
    def __init__(self, scene, settings=None):
        render_2d.__init__(self, scene, settings)

        self._open_circle_points = flex.vec2_double()
        self._open_circle_radii = []
        self._open_circle_colors = []
        self._filled_circle_points = flex.vec2_double()
        self._filled_circle_radii = []
        self._filled_circle_colors = []
        self._text = {"x": [], "y": [], "text": []}
        self._lines = []
        json_d = self.render(None)

        if self.settings.json.compact:
            indent = None
        else:
            indent = 2
        with open(self.settings.json.filename, "w") as fh:
            json.dump(json_d, fh, indent=indent)
Example #4
0
    def __init__(self, scene, settings=None):
        render_2d.__init__(self, scene, settings)

        self._open_circle_points = flex.vec2_double()
        self._open_circle_radii = []
        self._open_circle_colors = []
        self._filled_circle_points = flex.vec2_double()
        self._filled_circle_radii = []
        self._filled_circle_colors = []
        self._text = []
        self._lines = []
        json_d = self.render(None)
        import json
        if self.settings.json.compact:
            indent = None
        else:
            indent = 2
        json_str = json.dumps(json_d, indent=indent)
        with open(self.settings.json.filename, 'wb') as f:
            print >> f, json_str