I have a very simple question. I need to have a second x axis on my chart, and I want this axis to have a certain number of ticks that correspond to a specific position of the first axis.
Try an example. Here I draw the mass of dark matter as a function of the expansion coefficient, defined as 1 / (1 + z), which ranges from 0 to 1.
semilogy(1/(1+z),mass_acc_massive,'-',label='DM') xlim(0,1) ylim(1e8,5e12)
I would like to have another x axis at the top of my graph, showing the corresponding z for some values of the expansion coefficient. Is it possible? If so, how can I get xtics ax
python matplotlib
Brian May 9 '12 at 10:32 2012-05-09 10:32
source share