テキスト文字が Figure の背景色と異なるのはなぜですか?
16 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
次のコマンドを実行すると、スクリーン上に文字が表示される時に点滅するように見えます。
fg=figure('units','normalized');
bgc=get(fg,'color');
uh=uicontrol(fg,'style','text','units','normalized','position',[0.1 0.3 0.3 0.1], ...
'string','TEST','backgroundcolor',bgc);
Figureが表示される時、テキストの背景色は Figure の背景色より明るく、その後 Figure の背景色と同じ色になります。テキストの背景色を初めから Figure の背景色と同じ色にする方法を教えてください。
Respuesta aceptada
MathWorks Support Team
el 16 de Jul. de 2013
MATLABはデフォルトの構成要素背景色としてGUI が動作しているシステム上で、標準的なシステム背景色を使用します。この色の種類はコンピューターシステムによって異なります。例えば、灰色の色合いは Windows と UNIX で異なり、GUI のデフォルト背景色が一致しないことがあります。
問題を回避するには、MATLAB 起動時に次のコマンドを実行してください。
set(0,'defaultuicontrolBackgroundColor',get(0,'defaultFigureColor'))
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre グラフィックス オブジェクトのプロパティ en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!