crystal_toolkit.components.xas module
- class crystal_toolkit.components.xas.XASComponent(*args, **kwargs)[source]
Bases:
MPComponent
- default_xas_layout = {'autosize': True, 'height': 300, 'hovermode': 'x', 'margin': {'b': 50, 'l': 60, 'pad': 0, 'r': 30, 't': 50}, 'paper_bgcolor': 'rgba(0,0,0,0)', 'plot_bgcolor': 'rgba(0,0,0,0)', 'showlegend': False, 'xaxis': {'anchor': 'y', 'mirror': 'ticks', 'nticks': 8, 'showgrid': True, 'showline': True, 'side': 'bottom', 'tickfont': {'size': 16.0}, 'ticks': 'inside', 'title': 'Energy (eV)', 'titlefont': {'size': 16.0}, 'type': 'linear', 'zeroline': False}, 'yaxis': {'anchor': 'x', 'mirror': 'ticks', 'nticks': 7, 'showgrid': True, 'showline': True, 'side': 'left', 'tickfont': {'size': 16.0}, 'ticks': 'inside', 'title': 'Absorption Coeff, μ (a.u.)', 'titlefont': {'size': 16.0}, 'type': 'linear', 'zeroline': False}}
- empty_plot_style = {'paper_bgcolor': 'rgba(0,0,0,0)', 'plot_bgcolor': 'rgba(0,0,0,0)', 'xaxis': {'visible': False}, 'yaxis': {'visible': False}}
- generate_callbacks(app, cache)[source]
Generate all callbacks associated with the layouts in this app. Assume that “suppress_callback_exceptions” is True, since it is not always guaranteed that all layouts will be displayed to the end user at all times, but it’s important the callbacks are defined on the server.
- property layout
A Dash layout for the full component. Basic implementation provided, but should in general be overridden.
- Type
return
- line_colors = ['rgb(128, 0, 0)', 'rgb(0, 0, 128)', 'rgb(60, 180, 75)', 'rgb(145,30,180)', 'rgb(230,25,75)', 'rgb(240,50,230)']