Filter löschen
Filter löschen

plotting needs to configure 'linewidth' greater than default 0.5, otherwise no display of figure

1 Ansicht (letzte 30 Tage)
Hi,
After I upgraded to R2016a, I noticed that I have to specify 'linewidth' greater than the default value 0.5 to display the plot. Otherwise, the figure is shown as empty.
For example, x=1:10; plot(x) The figure will be empty.
Similarly, x=1:10; plot(x, 'linewidth', 0.5) The plot will be empty too. But plot(x,'linewidth', 1) The figure will be displayed.
Is there somewhere that I can configure the Matlab environment variables to fix this issue?
Thanks! Jing
  2 Kommentare
Walter Roberson
Walter Roberson am 18 Jan. 2017
You appear to be running Windows.
Are you running on a high resolution display? Please check your zoom settings; https://www.mathworks.com/matlabcentral/answers/317869-display-issues-with-matlab-images-in-gui#answer_248354
Does it help to set your figure renderer to zbuf or painters?
Walter Roberson
Walter Roberson am 19 Jan. 2017
I have a vague memory of this having shown up once before for Linux -- indeed when I read your description I thought it must be Linux until I looked at the window decoration and decided you were using MS Windows.
Unfortunately I do not seem to be able to google up whatever post it was (if indeed I am not just misremembering.)
I think it turned out to be an OpenGL driver issue. My confabulating memory is also suggesting to me it had to do with Intel HD 5000. My memory is probably lying.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Richard Zappulla
Richard Zappulla am 18 Jan. 2017
You can create a startup script which runs everytime you start MATLAB automatically. To do so, place a script named startup.m inside a folder which is on the path (i.e. default MATLAB folder works just fine) with the following:
set(0,'DefaultAxesFontSize',10,...
'DefaultTextFontSize',12,...
'DefaultLineLineWidth',1.5,...
'DefaultLineMarkerSize',10));

Weitere Antworten (2)

Greg
Greg am 18 Jan. 2017
set(groot,'DefaultLineLineWidth',1);
Note: I do NOT have the same issue running R2016a or R2016b on Windows 7 or 10. I've even explicitly run plot(1:10,'LineWidth',.1) and the plot looks great.

Jing C
Jing C am 18 Jan. 2017
Thank you Greg for your prompt answer. I should mention that I run Matlab in on a SUSE Linux server. I don't know how it is on Windows OS. Do you know which configuration file to put "set(groot,'DefaultLineLineWidth',1);" ? Thanks!

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by