Matlab - how to draw pixels on a black full screen?

前端 未结 3 1709
耶瑟儿~
耶瑟儿~ 2021-01-13 06:27

I want matlab to show me a full screen, all black, and to be able to set pixels on it.

Is it even possible?

3条回答
  •  醉梦人生
    2021-01-13 06:49

    Try this:

    screen_size = get(0, 'ScreenSize');
    
    buff=zeros(screen_size(3),screen_size(4));
    
    for i=1:50
        buff(screen_size(3)/2-i,screen_size(4)/2+i)=100;
    
    end
    f1 = image(buff)
    colormap(gray)
    
    set(gcf,'windowstyle','modal');
    set(gcf,'OuterPosition', screen_size); 
    set(gcf,'position',screen_size); 
    set(gcf,'Units','normal', 'outerposition',[0 0 1 1])
    set(gca,'Visible', 'Off', 'Position',[0 0 1 1]) 
    

    Use Alt+F4 (or equivalent) to kill the window. I don't fully understand why you have to do it this way, but it is the only way I've ever found to remove the window frame and make the plot extend full screen.

提交回复
热议问题