Hi,
I am trying to obtain a plot with 3 different subplots next to one another. The class used is pynbody.plot.stars.render() as I am trying to plot side-on images of the stars in a galaxy, where every subplot is a different age range. I am trying to assign the subplots by using the 'axes' keyword argument within the brackets, however no plot is being produced.
I tried using the example given in one of the tutorials in the Pynbody documentation (specifically, I used sph.velocity_image() where instead of 'axes' it takes 'subplots') and this worked, so the problem must be with the 'axes' argument.
Here is my code snippet:
fig = plt.figure()
plt1 = plt.subplot(131)
pynbody.plot.stars.render(young, axes=plt1)
plt2 = plt.subplot(132)
pynbody.plot.stars.render(intermediate, axes=plt2)
plt3 = plt.subplot(133)
pynbody.plot.stars.render(old, axes=plt3)
fig.suptitle(f"Images of stars with different ages for Simualtion {i}")
fig.savefig(f"Task 2 - Question 2 - sim{i}ages.pdf")
P.S. young, intermediate and old are filtered simulations of the stars according to their age.
Any suggestions as to why this is happening, please? Any help is greatly appreciated.
Thanks.
Kind regards,
Samuel