How to customize Smithchart results with multiple data

Hi all,
I would like to customize the data in the smithchart when using the smithplot function, where for example some data is dashed and other is solid.
My method was using the same method as you'd normally do with a normal plot, like down below
figure(1)
smithplot(Frequency1,data1,'b')
hold on
smithplot(Frequency2,data2,'b--')
However, when using this method it changes all of the data to the last linestyle, instead of keeping the original linestyle. Using the property editor also gives the same results. Data in the form of S-parameters and normal matrix data were tried.
I also tried working with objects, where the results of smithplot were stored in an object, but no luck there.
I am wondering whether there is a method to customize data when plotting it on a smithchart, without adjusting the rest of the data, or has MATLAB not integrated this in yet?
Thanks

 채택된 답변

Maadhav Akula
Maadhav Akula 2019년 12월 31일
편집: Maadhav Akula 2019년 12월 31일
I think you would have to use the LineStyle Property to achieve your required output.
From your code I am assuming that you want to plot (Frequency1,data1) with a solid line and (Frequency2,data2) with a dashed line. You can try the following code:
h = smithplot(Frequency1,data1,Frequency2,data2);
h.LineStyle = {'-','--'};% '-' - SolidLine; '--' - DashedLine
Or you can also change the LineStyle directly from the UI itself.
The following link might be helpful:
Hope this helps!

댓글 수: 3

Apologies for the late reply, but thank you very much. This works and with this I can also change the marker of the plots.
However, I want to do the same thing with the color (using h.Color = {'r','b'};), but this gives me an error about 2 different matrix sizes. Is there a way to fix this?
You have to use the ColorOrder property, try the following:
h.ColorOrder = {'r','b'};
The following link might be helpful:
Yes, this worked. Thank you!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

R2019a

질문:

Bas
2019년 12월 20일

댓글:

Bas
2020년 1월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by