is it possible to draw a square of width 1000 pixels, which is always 1000 pixels wide, even if the size of the window is changed on the screeen?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anna
el 8 de Ag. de 2014
Respondida: Image Analyst
el 8 de Ag. de 2014
I am trying to create an array of dots, each one pixel wide/tall so that the colour of each pixel can be specified. thanks
0 comentarios
Respuesta aceptada
Joseph Cheng
el 8 de Ag. de 2014
Editada: Joseph Cheng
el 8 de Ag. de 2014
I would use portions of this http://www.mathworks.com/matlabcentral/answers/100792-in-matlab-how-do-i-obtain-information-about-my-screen-resolution-and-screen-size. In this link they discuss how to get the number of pixels within the screen. Then using the get(__,'Position') or set() you can then derive how big your figure window is and then what that entails for the size of the axes you are plotting.
0 comentarios
Más respuestas (1)
Image Analyst
el 8 de Ag. de 2014
I'd make sure the 'units' property of everything is in pixels. Then I'd see if I can get into the callback of the gui resize event and put in a set(handles.axes1, 'Units', 'pixels', 'Position', [1,1,1000,1000]) or something like that.
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!