Exemplo n.º 1
0
def plot3D(data, width=700, height=500, pointSize=1.2, client=False):
    c3 = inlib.histo_c3d('xyz')
    [c3.fill(float(row[0]), float(row[1]), float(row[2]), 1) for row in data]

    #plotter
    if not client:
        plotter = window.gui_plotter(inlib.get_cout(), 1, 1, 0, 0, width,
                                     height)
    else:
        import inexlib_client
        style_file = os.path.join(os.environ['EXLIB_RES_DIR'], "ioda.style")
        plotter = inexlib_client.plotter(inlib.get_cout(), 1, 1, "127.0.0.1",
                                         50800, style_file)

#scen graph plotter
    sgp = plotter.plot_cloud3D(c3)
    sgp.shape.value(inlib.sg_plotter.xyz)
    sgp.shape_automated.value(False)
    sgp.infos_style().visible.value(False)
    sgp.points_style(0).color.value(inlib.colorf_black())
    #sgp.points_style(0).color.value(inlib.colorf_yellow())
    #sgp.points_style(0).modeling.value(inlib.modeling_points())
    sgp.points_style(0).marker_style.value(inlib.marker_dot)
    sgp.points_style(0).point_size.value(pointSize)

    if not client:
        plotter.show()
        plotter.steer()
    else:
        print("clearing scene")
        plotter.send_clear_static_scene()
        print("sending data to 127.0.0.1:50800 ...")
        plotter.send_plots()

    del plotter
    del c3
Exemplo n.º 2
0
 #sgp.y_axis_min.value(-46.5)
 #sgp.y_axis_max.value(-32.9)

 #sgp.z_axis_automated.value(False)
 #sgp.z_axis_min.value(1.0)
 #sgp.z_axis_max.value(1.2)

 #p.set_plotters_style("ROOT_default")
 #if args.vis_host == "134.158.76.71":  #LAL/wallino.
 #  p.set_plotters_style("wall_ROOT_default")
  
  if verbose == True : print("send plots ...")
  
  p.send_clear_static_scene()
  p.send_plots()
  del p

else:
  if verbose == True : print("plot (gui_window) ...")
  import window
  p = window.gui_plotter(inlib.get_cout(),1,1,0,0,700,500)
  p.plot_cloud3D(c3)
  p.show()
  p.steer()
  del p

#//////////////////////////////////////////////////////////
#//////////////////////////////////////////////////////////
#//////////////////////////////////////////////////////////
del c3                
Exemplo n.º 3
0
    sgp.y_axis_max.value(y_max)

    #p.set_plotters_style("ROOT_default")
    if args.vis_host == "134.158.76.71":  #LAL/wallino.
        p.set_plotters_style("wall_ROOT_default")

    if verbose == True: print("send plots ...")

    p.send_clear_static_scene()
    p.send_plots()
    del p

else:
    if verbose == True: print("plot (gui_window) ...")
    import window
    p = window.gui_plotter(inlib.get_cout(), 2, 2, 0, 0, width, height)

    sgp = p.plot_histo(h1_0)
    sgp.y_axis_automated.value(False)
    sgp.y_axis_min.value(0)
    sgp.y_axis_max.value(y_max)
    p.next()
    sgp = p.plot_histo(h1_1)
    sgp.y_axis_automated.value(False)
    sgp.y_axis_min.value(0)
    sgp.y_axis_max.value(y_max)
    p.next()
    sgp = p.plot_histo(h1_2)
    sgp.y_axis_automated.value(False)
    sgp.y_axis_min.value(0)
    sgp.y_axis_max.value(y_max)