From 33bf3d68336ea9cce022b2c44557abaf6160b91e Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Mon, 31 Mar 2025 22:41:05 +0200 Subject: [PATCH] renamed buttons, labled the axes --- isotables/isotopapp/templates/home.html | 6 +++--- isotables/isotopapp/views.py | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/isotables/isotopapp/templates/home.html b/isotables/isotopapp/templates/home.html index 7fe9b76..39b2fdf 100644 --- a/isotables/isotopapp/templates/home.html +++ b/isotables/isotopapp/templates/home.html @@ -42,7 +42,7 @@ {% endfor %}
- +
@@ -50,7 +50,7 @@
- +
@@ -58,7 +58,7 @@
- +
diff --git a/isotables/isotopapp/views.py b/isotables/isotopapp/views.py index 2fd80a6..c1dd01e 100644 --- a/isotables/isotopapp/views.py +++ b/isotables/isotopapp/views.py @@ -84,11 +84,12 @@ def result(request): gradient = float(request.GET.get('gradient')) # create a plot (bokeh) - plot = figure(outer_width=400, outer_height=400, match_aspect=True) + plot = figure(outer_width=500, outer_height=500, match_aspect=True) plot.ellipse(x=[0], y=[0], width=5, height=5, color="#D5D9FF", alpha=0.8, line_width=1, line_color="black") plot.ellipse(x=[0], y= [2.5], width=5, height=5, color="#D5D9FF", alpha=0.4, line_width=1, line_color="black") plot.ellipse(x=[0], y=[-2.5], width=5, height=5, color="#D5D9FF", alpha=0.4, line_width=1, line_color="black") - + plot.xaxis[0].axis_label = 'x / mm' + plot.yaxis[0].axis_label = 'z / mm' close_isotopes = [] for isotope in Isotope.objects.all(): @@ -109,12 +110,10 @@ def result(request): x=frame_left, y=frame_bottom, anchor="bottom_left", - #text=MathML(text=f"{isotope1.n_nucleons}{isotope1.symbol}: {freq:.1f} MHz\ng={gradient:.1f} T/m\n5 mm sample dia."), text=f"{isotope1.n_nucleons}{isotope1.symbol}: {freq:.1f} MHz\ng={gradient:.1f} T/m\n5 mm sample dia.", - #text=MathML("tewt"), padding=5, border_radius=5, - border_line_color="black", background_fill_color="white", + border_line_color="#D5D9FF", background_fill_color="white", ) plot.add_layout(citation)