I am using MATLAB R2017b to create a bar plot. I have 2 x-tick labels on a bar plot, 'test1' and 'test2', I want to align them vertically, that is each character in a new line. For example, like this:
I tried using the following code:
t1 = "t" + newline + "e" + newline + "s" + newline + "t" + newline + "1";t2 = "t" + newline + "e" + newline + "s" + newline + "t" + newline + "2";bar([t1 t2],[2 3])
But I got an error, how to resolve this?
Best Answer