Skip to content
Snippets Groups Projects
Commit 21a6bd9f authored by Simon Wittl's avatar Simon Wittl
Browse files

added axes in plots

parent 256b5717
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,11 @@ from CyXTraX.common import MeshObject
import numpy as np
from matplotlib import pyplot as plt
from pathlib import Path
FOLDER = Path(__file__)
TEMP_FOLDER = FOLDER.parent.parent / 'temp'
def main():
......@@ -41,13 +46,23 @@ def main():
ax1.imshow(half_rays)
ax1.set_xlabel(r'$Z$ / mm')
ax1.set_ylabel(r'$\alpha$ / rad')
ax1.set_title('Half Rays')
ax1.set_xticks([0, 1000, 2000])
ax1.set_xticklabels([r'$-3141.5$', r'$0.$', r'$3141.5$'])
ax1.set_yticks([0, 1000, 2000])
ax1.set_yticklabels([r'$-\pi$', r'$0.$', r'$\pi$'])
ax2 = fig.add_subplot(122)
ax2.imshow(full_rays)
ax2.set_xlabel(r'$Z$ / mm')
ax2.set_ylabel(r'$\alpha$ / rad')
ax2.set_title('Full Rays')
ax2.set_xticks([0, 1000, 2000])
ax2.set_xticklabels([r'$-3141.5$', r'$0.$', r'$3141.5$'])
ax2.set_yticks([0, 1000, 2000])
ax2.set_yticklabels([r'$-\pi$', r'$0.$', r'$\pi$'])
plt.show()
plt.savefig(TEMP_FOLDER / 'scones.png')
if __name__ == '__main__':
......
......@@ -59,7 +59,7 @@ def main():
print(f'Step {i}: Value Cylinder {values_calc[i]:2.2f} \t/\t Value Projection {mapped_values[i]:2.2f}')
fig = plt.figure(figsize=(25, 10))
fig = plt.figure(figsize=(24, 10))
subfig1: figure.Figure
subfig2: figure.Figure
subfig1, subfig2 = fig.subfigures(1, 2)
......@@ -91,9 +91,11 @@ def main():
ax.scatter(angles_calc[0, counter], angles_calc[1, counter], c=colors[counter])
ax.set_xlabel(r'$z$ / mm')
ax.set_ylabel(r'$\alpha$ / rad')
ax.set_xticks([])
ax.set_yticks([])
ax.set_xticks([0, 1000, 2000])
ax.set_xticklabels([r'$-3141.5$', r'$0.$', r'$3141.5$'])
ax.set_yticks([0, 1000, 2000])
ax.set_yticklabels([r'$-\pi$', r'$0.$', r'$\pi$'])
counter += 1
plt.tight_layout()
......
temp/mapping.png

382 KiB | W: | H:

temp/mapping.png

363 KiB | W: | H:

temp/mapping.png
temp/mapping.png
temp/mapping.png
temp/mapping.png
  • 2-up
  • Swipe
  • Onion skin
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment