Skip to content

Commit

Permalink
Split plots
Browse files Browse the repository at this point in the history
  • Loading branch information
Lena Pöpping committed Nov 22, 2023
1 parent ca2920c commit 0582a11
Showing 1 changed file with 87 additions and 29 deletions.
116 changes: 87 additions & 29 deletions docs/report/999.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -867,9 +867,6 @@
"execution_count": null,
"metadata": {
"editable": true,
"jupyter": {
"source_hidden": true
},
"slideshow": {
"slide_type": ""
},
Expand Down Expand Up @@ -915,18 +912,28 @@
"sheet_colors = {\n",
" \"Unphysical\": \"red\",\n",
" \"Physical\": \"blue\",\n",
"}\n",
"\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"hide-input",
"scroll-input"
]
},
"outputs": [],
"source": [
"Sn = go.Surface(x=X, y=Yn, z=project(Tn), **sty(\"Unphysical\"))\n",
"Sp = go.Surface(x=X, y=Yp, z=project(Tp), **sty(\"Physical\"))\n",
"\n",
"Sn_cm = go.Surface(x=X, y=Yn, z=project(Tn_cm), **sty(\"Unphysical\"))\n",
"Sp_cm = go.Surface(x=X, y=Yp, z=project(Tp_cm), **sty(\"Physical\"))\n",
"\n",
"Sn_cm_conj = go.Surface(x=X, y=Yn, z=project(Tn_cm_conj), **sty(\"Unphysical\"))\n",
"Sp_cm_conj = go.Surface(x=X, y=Yp, z=project(Tp_cm_conj), **sty(\"Physical\"))\n",
"\n",
"zeros = np.zeros(x.shape)\n",
"\n",
"line_rho = go.Scatter3d(\n",
" x=x,\n",
" y=zeros,\n",
Expand All @@ -935,14 +942,6 @@
" mode=\"lines\",\n",
" name=\"Lineshape\",\n",
")\n",
"line_cm = go.Scatter3d(\n",
" x=x,\n",
" y=zeros,\n",
" z=project(Tn_cm_conj[0]),\n",
" line={\"color\": \"black\", \"width\": 4},\n",
" mode=\"lines\",\n",
" name=\"Lineshape\",\n",
")\n",
"\n",
"threshold_point = go.Scatter3d(\n",
" x=[(m1_val + m2_val) ** 2],\n",
Expand All @@ -952,7 +951,6 @@
" marker={\"color\": \"black\", \"size\": 5},\n",
" name=\"Threshold\",\n",
")\n",
"\n",
"fig_rho = go.Figure(data=[Sn, Sp, line_rho, threshold_point])\n",
"fig_rho.update_layout(\n",
" height=550,\n",
Expand All @@ -968,22 +966,82 @@
" zaxis_range=[-vmax, +vmax],\n",
")\n",
"\n",
"fig_cm = go.Figure(data=[Sn_cm_conj, Sp_cm, line_cm, threshold_point])\n",
"fig_cm.update_layout(\n",
"fig_rho.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"editable": true,
"slideshow": {
"slide_type": ""
},
"tags": [
"full-width",
"hide-input",
"scroll-input"
]
},
"outputs": [],
"source": [
"import plotly.graph_objects as go\n",
"from plotly.subplots import make_subplots\n",
"\n",
"Sn_cm = go.Surface(x=X, y=Yn, z=project(Tn_cm), **sty(\"Unphysical\"))\n",
"Sp_cm = go.Surface(x=X, y=Yp, z=project(Tp_cm), **sty(\"Unphysical\"))\n",
"\n",
"Sn_cm_conj = go.Surface(x=X, y=Yn, z=project(Tn_cm_conj), **sty(\"Physical\"))\n",
"Sp_cm_conj = go.Surface(x=X, y=Yp, z=project(Tp_cm_conj), **sty(\"Physical\"))\n",
"\n",
"line_cm = go.Scatter3d(\n",
" x=x,\n",
" y=zeros,\n",
" z=project(Tn_cm[0]),\n",
" line={\"color\": \"black\", \"width\": 4},\n",
" mode=\"lines\",\n",
" name=\"Lineshape\",\n",
")\n",
"\n",
"fig = make_subplots(\n",
" rows=1,\n",
" cols=3,\n",
" specs=[[{\"type\": \"surface\"}, {\"type\": \"surface\"}, {\"type\": \"scatter3d\"}]],\n",
")\n",
"\n",
"fig.add_trace(Sn_cm, row=1, col=1)\n",
"fig.add_trace(Sp_cm, row=1, col=1)\n",
"\n",
"fig.add_trace(Sn_cm_conj, row=1, col=3)\n",
"fig.add_trace(Sp_cm_conj, row=1, col=3)\n",
"\n",
"fig.add_trace(Sn_cm, row=1, col=2)\n",
"fig.add_trace(Sp_cm_conj, row=1, col=2)\n",
"\n",
"fig.add_trace(line_cm, row=1, col=2)\n",
"\n",
"fig.add_trace(threshold_point, row=1, col=2)\n",
"\n",
"fig.update_layout(\n",
" height=550,\n",
" width=600,\n",
" width=1200,\n",
" showlegend=False,\n",
" title_text=f\"{projection_text} part of T function with Chew-Mandelstam\",\n",
")\n",
"fig_cm.update_scenes(\n",
"fig.update_scenes(\n",
" xaxis_title_text=\"Re s\",\n",
" yaxis_title_text=\"Im s\",\n",
" zaxis_range=[-vmax, +vmax],\n",
")\n",
"\n",
"fig_rho.show()\n",
"fig_cm.show()"
"fig.show()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand All @@ -1005,7 +1063,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.18"
"version": "3.11.6"
},
"orphan": true
},
Expand Down

0 comments on commit 0582a11

Please sign in to comment.