I have a plot that shows Cumulative Distribution values and a 'survival function' as well.
import numpy as np
import matplotlib.pyplot as plt
values, base = np.histogram(serWEB, bins=100)
cumulative = np.cumsum(values)
# plot the cumulative function
plt.plot(base[:-1], cumulative, c='blue')
plt.title('Cumulative Distribution')
plt.xlabel('X Data')
plt.ylabel('Y Data')
# survival function next
plt.plot(base[:-1], len(serWEB)-cumulative, c='green')
plt.show()
This plot shows the values as the main Y-Axis. I am interested in adding a 2nd Y-Axis on the right to show the percentages.
How to do that?