Learn practical skills, build real-world projects, and advance your career
Created 3 years ago
from tardis import run_tardis
import tardis
from pylab import *
cmap = cm.get_cmap('jet', 20)
colors = []
for i in range(cmap.N):
rgb = cmap(i)[:3]
colors.append(matplotlib.colors.rgb2hex(rgb))
import plotly.graph_objects as go
# making subplots
fig = go.FigureWidget().set_subplots(1,2, shared_xaxes=True,)
fig.add_scatter(row = 1, col = 1)
fig.add_scatter(row = 1, col = 2)
# updating axes
fig['layout']['yaxis2']['title'] = r"$W$"
fig['layout']['xaxis2']['title'] = r"$Shell~~Velocity$"
fig['layout']['yaxis']['title'] = r"$T_{rad}\ [K]$"
fig['layout']['xaxis']['title'] = r"$Shell~~Velocity$"
fig['layout']['yaxis']['range'] = [9000, 14000]
fig['layout']['yaxis']['tickformat'] = "g"
fig['layout']['xaxis2']['showexponent'] = "all"
fig['layout']['xaxis']['showexponent'] = "all"
fig['layout']['xaxis2']['exponentformat'] = "e"
fig['layout']['xaxis']['exponentformat'] = "e"
fig['layout']['xaxis2']['matches'] = "x"
fig = fig.update_layout(height = 580)
if you want to select multiple iterations at once, and compare them
see here
fig
FigureWidget({
'data': [{'type': 'scatter', 'uid': 'db2695b5-c6fe-454b-a66f-86d01a739f21', 'xaxis': 'x', '…