MATLAB How to Continually Update Text on a Plain Figure Environment in Matlab?

Click For Summary
To display continually updated numbers in a plain figure environment without a visible plot, one effective approach is to create a figure and hide the axes. By using the command `set(gca,'Visible','off')`, the axes can be made invisible. The text can then be updated in a loop using the `text` function to display the desired numbers. The `cla` command can be used to clear the current axes, ensuring that only the updated text is shown. This method allows for a clean display of numbers in the gray figure window without any distracting plot elements.
rsq_a
Messages
103
Reaction score
1
I want to be able to display continually updated numbers on a plain figure environment. For example, a cheap way to do this is:

Code:
figure(1)
for j = 1:10
  title([ 'Hello'; num2str(j) ])
end

This prints out a two-liner ('Hello' and a number) in the title portion of the figure.

I want the same thing, but with no actual white plot. In other words, I just want the gray figure window, and updated figures.

How would I do this?
 
Physics news on Phys.org
Something like to following

Code:
figure(1)
set(gca,'Visible','off')

for j=1:10
  text(0,0,num2str(j)
  cla
end


should work
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
3
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
2K