I'm trying to have the integers evenly spaced on the x axis of a ListPlot, and the prime numbers evenly spaced on the y axis.
maxPrimeIndex = 25;
maxPrime = Prime[maxPrimeIndex];
Flatten[(Partition[
Riffle[Flatten[FactorInteger[#]][[;; ;; 2]], #, {1, -2, 2}], 2]
) & /@ Range[2, maxPrime], 1];
ListPlot[%,
Ticks -> {Automatic, Prime[Range[1, maxPrimeIndex]]},
PlotRange -> {{0, maxPrime}, {0, maxPrime}}
]
How can I get the y axis to be evenly spaced?
ScalingFunctions -> {PrimePi, Prime}
option toListPlot
. $\endgroup$