I want to plot a figure whose xtick values grow at the power of 2.
For example,
import pandas as pd
data = pd.DataFrame({
'x': [2, 4, 8, 16, 32, 64],
'y': [1, 2, 3, 4, 5, 6]
})
What I expect is a figure like this,

For tidy data like the sample above, I can just create an auxiliary column x2 of 1~6 in this dataframe and then set the xticklabels of the figure to 2^1~2^6. However, this workaround doesn't apply to situations with other values like 3, 7 or 30.
It seems that matplotlib only supports a log scale. How can I achieve a tick with a power scale of 2?