How to have smithPlot with outer area with white colour?

조회 수: 11 (최근 30일)
Araz Garaz
Araz Garaz 2024년 2월 19일
답변: Sergio 2025년 7월 21일
Hi
I was using this code for years giving me perfectly fine smith plots with white colour )inner, outer and background).
figure
sm = smithplot(gca);
hold on
% Set the background color of the outer area to white
ax = gca;
set(gcf, 'Color', 'white');
% Rest of your code
sm.ArcTickLabelVisible = 0;
sm.CircleTickLabelVisible = 0;
sm.Marker = {'+'};
sm.GridBackgroundColor = 'w';
sm.TitleTopFontSizeMultiplier = 1.75;
sm.GridLineWidth = 1;
I recently upgraded to MATLAB R2024a, and same code gives me smith plot with grau outer area, although I command for a white one.
Any recommnedation on this ?
Thanks

채택된 답변

Jonas
Jonas 2024년 2월 21일
편집: Jonas 2024년 2월 21일
weird function. i never used it before. but setting the Figure color before plotting with the smithplot seems to use the background color of the figure. when using smithplot before setting the color, the background cannot be adjusted anymore
fig = figure;
fig.Color = 'r'; % Change 'r' to your desired color
% Create a Smith chart
s = smithplot(rand(1,10));
fig = figure;
% Create a Smith chart
s = smithplot(rand(1,10));
fig.Color = 'r'; % Change 'r' to your desired color
  댓글 수: 2
Araz Garaz
Araz Garaz 2024년 2월 21일
haha, yes it may sound a bit weird figure if you are not fimiliar with, it is an RF function, thanks for your answer!
Jonas
Jonas 2024년 2월 22일
maybe a nice way to draw mandalas :D
happy to help!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Sergio
Sergio 2025년 7월 21일
In the 2021 version, setting the white background worked fine for me with:
fig = figure; % create figure
set(fig, 'Color', 'white'); % then change the figure's color
When I updated to 2025, I had trouble setting the white background even when I forced it. I found a temporary solution with:
fig = figure; % create figure
s = smithplot(gca); % create the smithplot associated with the current axes
set(fig, 'Color', 'white'); % then change the figure's color
s.GridBackgroundColor = 'w'; % and chart background color
set(findall(fig, 'Type', 'Patch'), 'FaceColor', [1 1 1]);

카테고리

Help CenterFile Exchange에서 Polar Plots에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by