I am using matplotlib to graph a group of data points. I want to add another x-axis on top of the plot with different units than the original one (Want wavelength instead of log(frequency). I have seen lots of other examples on here, but they all have to do with a continuous plot, and I can't quite figure out how to use the .twinx() function for a graph with data points. Here is what I have so far for the plot:
plt.plot([x_values], [y_values], 'ks')
plt.text(x3, y3, u'\u2193', fontname='STIXGeneral', size=20,
va='top', ha='center', clip_on=True, color='k')
plt.text(x5, y5, u'\u2193', fontname='STIXGeneral', size=20,
va='top', ha='center', clip_on=True, color='k')
plt.axis([x_0, x_max, y_0, y_max])
plt.ylabel('$log(frequency) \circ Luminosity)$')
plt.xlabel('$log(frequency)$')
plt.title('C1')
plt.show
I am new to python, so any suggestions would be great!