2
$\begingroup$

I'm trying to make a grayscale plot like the one shown below, except I'd like it to plot vertically.

enter image description here

ArrayPlot seems to only plot horizontally. Is there a way to make it plot vertically or is there another function more suitable?

ArrayPlot[{Table[Log[x], {x, 1/256, 1, 1/256}]}, AspectRatio -> .08, 
 Frame -> False]
$\endgroup$

1 Answer 1

4
$\begingroup$

Use Transpose on your list.

ArrayPlot[Transpose@{Table[Log[x], {x, 1/256, 1, 1/256}]}, 
 AspectRatio -> 1/.08, Frame -> False]

enter image description here

$\endgroup$
1
  • $\begingroup$ Equivalently, change to Table[{Log[x]}, {x, 1/256, 1, 1/256}]. $\endgroup$
    – Alan
    Mar 29 at 21:54

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.