8d63d75858cc6df30ea19c55f0da955d8d46f53a,pyntcloud/core_class.py,PyntCloud,plot,#PyntCloud#,628

Before Change


            camera = pythreejs.PerspectiveCamera(
                fov=90,
                aspect=width / height,
                position=tuple(self.centroid + [0, abs(self.xyz.max(0)[1]), abs(self.xyz.max(0)[2]) * 2]),
                up=[0, 0, 1])
            children.append(camera)

            orbit_control = pythreejs.OrbitControls(controlling=camera)
            orbit_control.target = tuple(self.centroid)

            camera.lookAt(tuple(self.centroid))

After Change


            from IPython.display import display

            children = []
            widgets = []

            if mesh:
                raise NotImplementedError("Plotting mesh geometry with pythreejs backend is not supported yet.")

            if polylines:
                lines = get_polylines_pythreejs(polylines)
                children.extend(lines)

            points = get_pointcloud_pythreejs(self.xyz, colors)
            children.append(points)

            size = ipywidgets.FloatSlider(value=initial_point_size, min=0.0, max=(ptp / 20), step=(ptp / 200))
            ipywidgets.jslink((size, "value"), (points.material, "size"))
            widgets.append(ipywidgets.Label("Point size:"))
            widgets.append(size)

            camera = get_camera_pythreejs(self.centroid, self.xyz, width, height)
            children.append(camera)

            controls = [get_orbit_controls(camera, self.centroid)]

            if not scene:
                scene = pythreejs.Scene(children=children)

                renderer = pythreejs.Renderer(
                    scene=scene,
                    camera=camera,
                    controls=controls,
                    width=width,
                    height=height)

                display(renderer)

                color = ipywidgets.ColorPicker()
                ipywidgets.jslink((color, "value"), (scene, "background"))
                widgets.append(ipywidgets.Label("Background color:"))
                widgets.append(color)

            display(ipywidgets.HBox(children=[widgets]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: daavoo/pyntcloud
Commit Name: 8d63d75858cc6df30ea19c55f0da955d8d46f53a
Time: 2018-07-26
Author: daviddelaiglesiacastro@gmail.com
File Name: pyntcloud/core_class.py
Class Name: PyntCloud
Method Name: plot


Project Name: Scitator/catalyst
Commit Name: f4beaac559e00a3676d942dc7e8fea69efc01cfe
Time: 2020-11-30
Author: raveforlive@gmail.com
File Name: catalyst/metrics/mrr.py
Class Name:
Method Name: mrr


Project Name: geekcomputers/Python
Commit Name: e1c4e6a7c7db68e123d978bfc56feb057898935f
Time: 2019-10-24
Author: kostasdedesar@penguin
File Name: Counting-sort.py
Class Name:
Method Name: