1
$\begingroup$

Is it possible to have two sets of labels for the $x$-axis tick marks using ListPlot? For example, could we have tick marks labels: {1,2,3,4,...}, and then right below these labels, the values for the powers of two: {2,4,8,16,...}?

$\endgroup$

1 Answer 1

2
$\begingroup$

A starting point :

data = Table[{i, i + 1}, {i, 10}];
ListPlot[data, Ticks -> {Table[{i, Column[{i, Style[2^i, Red]}]}, {i, 10}], Automatic}]

Mathematica graphics

$\endgroup$
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.