0

I'm trying to build a confusion matrix in Latex following the approach in:

How to construct a confusion matrix in LaTeX?

Instead of the text inside the boxes, I would like to have numbers (at the center of the each box). If I substitute the text with a number (e.g. \Mybox{x}), I get the following error: "Mysplaced alignment character tab &".

Could you help me with this?

Also I would not need the small p's and n's, but only the row/column sums.

Thank you for your help

Eaglez
  • 1
  • \MyBox in the code that you reference takes two arguments and {x} is just one.It is nothing to do with being numbers or letters – David Carlisle Aug 13 '19 at 19:21

1 Answers1

1

\MyBox in the code that you reference takes two arguments and {x} is just one.It is nothing to do with being numbers or letters.

Use \MyBox{x}{y} or even just \MyBox{x}{}

David Carlisle
  • 757,742
  • Thank you David. I just need one number in the box, using \MyBox{x}{} gives me the number in the box but not centered. What should I do to make it appear in the center of the box? – Eaglez Aug 13 '19 at 19:36
  • @SimondeFauconval that's a different question but perhaps define it as one argument and replace #1\\#2 by #1 – David Carlisle Aug 13 '19 at 20:05