Formating individual cells in uitable or equivalent
5 views (last 30 days)
Show older comments
I am using uitable to display a table of values in a figure. I need to be able to color each cell in the table, based on some threshold. For example, values that meet or exceed this threhold value can be red. Values below the threshold can be green. It does not appear from the documentation that one can format individual cells this way using uitable.
Excel can do this, but I'd rather not be jumping from one tool to another. FWIW, I do not need the interactive features of uitable, but it was the only means I found to display a table in a figure.
1 Comment
Accepted Answer
Jan
on 28 Mar 2013
Edited: Jan
on 28 Mar 2013
You can use HTML-formats inside the table's contents, see: https://www.mathworks.com/support/solutions/en/data/1-D782JW/index.html?product=ML&solution=1-D782JW
A very good idea is to ask your favorite internet search engine for e.g. "Matlab uitable color" before asking the forum. You get a lot of helpful links. It should be mentioned, that Google needs 0.23 seconds to find more than 10'000 links. Although I really like and appreciate the competence of this forum, we cannot and should not compete with e.g. Google in cases of such standard problems. Ok?
The standard procedure for such questions is:
- Search in Matlab's documentation
- Search in the internet
- Search in the FileExchange and the Answers forum
- If not successful yet, ask the forum.
More Answers (0)
See Also
Categories
Find more on Environment and Settings in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!