MATLAB: How to create a finite element bar

bargraphheatMATLABpropagation

Hello everyone,
I'm starting to use Matlab to model some really simple model and I would need some help because I couldn't find the solution online. I would like to create a 2D bar and decompose it into rectangular elements (I would need to imput their number in both directions).
Then my matlab code can determine a temperature in each of these rectangular elements (I already have this code).
So the second part of the problem would be to have that temperature appearing into all the rectangular elements (their value and a colour if possible).
Would it be possible ? Is there somewhere I can find it (maybe I didn't searched using the right terms) ?
Thank you and have a nice day.