from coilpy import *
data = FOCUSHDF5('focus_ellipse.h5')
plasma = FourSurf.read_focus_input('plasma.boundary')
coil = Coil.read_makegrid('ellipse.coils')
# create a new figure
import plotly.graph_objects as go
fig = go.Figure()
# plot Bn from FOCUS output and the coils with finite-build
data.plot(engine='plotly', scalars='Bn', fig=fig, show=False)
coil.plot(irange=range(0,16,4),engine='plotly',fig=fig, show=True, plot2d=True, width=0.05, height=0.05, color='grey')
# plot 3D surface from FourSurf and coils as lines.
fig = go.Figure()
plasma.plot3d(engine='plotly', fig=fig, show=False)
coil.plot(irange=range(0,16,4),engine='plotly',fig=fig, show=True, plot2d=False, color='grey')