0
$\begingroup$

Given the data: {{1.4, 0}, {0, 1.0}} I can create a heatmap using

DensityHistogram[{{1.4, 0}, {0, 1.0}}, {1}]

enter image description here

However, the tick marks are not informative. I need for the heatmap to show actual labels for each column and row. I need something like:

enter image description here

How can I achieve this? I have tried adjusting the bin size but that still leaves the numbers and tick marks; it just changes their spacing.

$\endgroup$

1 Answer 1

2
$\begingroup$

How about

d = {{1.4, 0}, {0, 1.0}};
ticks = Transpose[{{1, 2}, {"Seq1", "Seq2"}}];
MatrixPlot[d, FrameTicks -> {ticks, ticks, ticks, ticks}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Great. Thank you! This will work great. $\endgroup$
    – Jamie
    Apr 10, 2020 at 19:49

Your Answer

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

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