Commits

Alexander Konovalov  committed c9cde48

rmax changed on data change

  • Participants
  • Parent commits 91783a7

Comments (0)

Files changed (1)

File utils/plot_scattering.py

     ax = fig.add_axes([0.1, 0.1, 0.8, 0.8], polar=True, axisbg='#d5de9c')
 
     plot, = ax.plot(scatter_angles, scatter_data[0,:], color='#ee8d18', lw=3)
-    ax.set_rmax(scatter_data.max())
+    ax.set_rmax(scatter_data[0,:].max())
     plt.grid(True)
 
     ax.set_title("n = %s" % n_data[0], fontsize=15)
     def update(val):
         n = np.argmin((n_data - sn.val)**2)
         plot.set_ydata(scatter_data[n,:])
+        ax.set_rmax(scatter_data[n,:].max())
         plt.draw()
     sn.on_changed(update)