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

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 Aug 13, 2019 at 19:21

1 Answer 1

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}{}

2
  • 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, 2019 at 19:36
  • @SimondeFauconval that's a different question but perhaps define it as one argument and replace #1\\#2 by #1 Aug 13, 2019 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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