I can't get smithplot to work with tiledlayout
Show older comments
I want to do the typical 2x2 tiledlayout for four smith charts with different data.
From what I can gather, matlab has offered tiledlayout support for surf(), contour(), polarscatter(), plot(), etc etc. A lot of stuff, but for some reason they didn't make it work for smith charts. Honestly, I really just don't think it's supported so I'm writing this in the hopes that someone sees it and realizes it would be nice to make it supported. I saw some old stuff someone came up with to make it work with subplot and it's quite deplorable. It makes the smith charts miniscule and in IEEE format (two column) it would be very hard to read. At this point for my publication I'm likely just going to have to take each smith chart, put them in the order I want in Onenote or something, and take a screen capture.
Here is some code you can mess around with (the stuff I'm plotting is way too much to throw in here):
data = nport('default.s2p'); %this default.s2p is likely included in the RF toolbox so I'd make sure you have that.
t = tiledlayout(2,2);
% Tile 1
nexttile
smithplot(data)
% Tile 2
nexttile
smithplot(data)
% Tile 3
nexttile
smithplot(data)
% Tile 4
nexttile
smithplot(data)
It just ends up plotting them like a normal figure; everytime a smithplot is encounterd and appears to completely ignore the nexttile code.
1 Comment
Chase Griswold
on 16 Mar 2024
Answers (1)
Hi Chase,
I tried plotting a 2X2 "tiledlayout" for four "smithplots" but was not able to figure it out and I too believe "tiledlayout" is not supported for "smithplots". But here is a workaround using subplots and hopefully meets your expected quality.
data = nport('default.s2p');
figure;
for idx = 1:4
sp = subplot(2, 2, idx);
pos = get(sp, 'Position');
delete(sp);
ax = axes('Position', pos);
smithplot(data, 'Parent', ax);
end
Have attached a figure of the same as well and hope it helps!
1 Comment
Chase Griswold
on 29 Mar 2024
Categories
Find more on Axes Appearance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!