Displaying various data types

Line

  1. Display 1D data by the command below:

    display([1,2,3])
    
  2. Double click the graph to open graph setting in the sidebar and go to “Lines” tab.

  3. Select the first data.

../_images/image13.png
  1. Set the parameters below.

  • Color: Red

  • Line Type: dashed

  • Line Width: 1

  • Marker Type: Circle

  • Marker Filling: left

  • Marker Size: 7

  • Marker Thick: 2

../_images/image23.png
  1. Go to “Errorbar” tab, set the parameters below.

  • Cap size: 4

  • y error Type: Const

  • y error Value: 0.2

../_images/image32.png
  1. Go to “Offset” tab, set the parameters below. Note that the vertical and horizontal axes are changed.

  • x offset: 1

  • x muloffset: 0.5

  • y offset: 2

  • y muloffset: 0 (Auto)

../_images/image42.png
  1. Go to “Legend” tab, set the parameters below.

  • Show legent: checked

  • Position x: 0.35

  • Position y: 0.7

../_images/image52.png
  1. Right click the first data, and select “Hide”. After you confirm the data is hidden, select “Show”.

../_images/image62.png
  1. Right click the first data, and select “Raw Data”-“Display”. A new graph is displayed.

  2. Right click the first data, and select “Processed Data”-“Display”. A new graph is displayed. Note that vertical and horizontal axes are changed.

  3. Right click the graph, and select “Duplicate as”-“Matplotlib”. The graph is duplicated.

../_images/image71.png

Image

  1. Display 2D data by the code below:

    import numpy as np
    x = y = np.linspace(-10,10,100)
    data = np.random.rand(100,100)
    display(Wave(data, x, y))
    
  2. Double click the graph to open graph setting.

  3. Go to “Images” tab, select the first data.

../_images/img1.png
  1. Set the parameters below.

  • Gam: 1.2

  • Rev: checked

  • Colormap: terrain

  • Min: 0

  • Max: 2

../_images/img2.png
  1. Go to “Offset” tab, set the parameters below. Note that the vertical and horizontal axes are changed.

  • x offset: 2

  • y offset: 1

../_images/img3.png
  1. Goto “Colorbar” tab, set the parameters below.

  • Show colorbar: checked

  • Length: 0.5

../_images/img4.png

RGB image

  1. An image of shape (n, m, 3) is treated as RGB image. Display RGB image by the code below:

    display(np.random.rand(100,100,3))
    
  2. Double click the image to open graph setting, go to “RGB” tab, and select the first data.

  • Min: 0

  • Max: 2

../_images/rgb2.png
  1. Go to “Colormap” tab, and check “Show colormap”.

../_images/rgb3.png

Vector field

  1. An image of shape (n, m, 2) is treated as vector field. Display vector field by the code below. Note that it is hard to see if there are too many points (like 100*100):

    display(np.random.rand(10,10,2))
    
  2. Double click the image to open graph setting, go to “Vector” tab, and select the first data.

  3. Set the parameters below.

  • Pivot: middle

  • color: Red

  • scale: 11

  • width: 1.5

../_images/vector1.png

Complex image

  1. Complex image A(x,y) can be converted to vector field whose x component is real(A) and y component is imag(A). Such vector fields can be converted to colomap via color wheel.

  2. Make 2D complex image and display colormap and vector field by the code below:

    import numpy as np
    x = y = np.linspace(-10,10, 10)
    xx, yy = np.meshgrid(x,y)
    A = xx + yy*1j
    display(Wave(A,x,y))
    append(Wave(A,x,y), vector=True) # vector=True is needed to show the complex image as vector
    
../_images/complex1.png

Contour

  1. You can add contour by the code below. However, contour map is under test. We do not recomment the general users to use this function:

    display(np.random.rand(100,100), contour=True)