Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X-axis numbers and putting frequency information on the chart #2

Open
shabaz123 opened this issue Jul 15, 2024 · 0 comments
Open

X-axis numbers and putting frequency information on the chart #2

shabaz123 opened this issue Jul 15, 2024 · 0 comments

Comments

@shabaz123
Copy link

shabaz123 commented Jul 15, 2024

Hello,

Great project. I've written a short Python program that plots a .s1p file using SmithAxes from mpl-smithchart.

The result I get:
my_result

The Smith Chart result is excellent, however I had a couple of questions.

(1) The x-axis label values have values 0, 0.1, 0.3, 0.6, 1, 1.5, 2.4 and so on. Is it possible to change that to be more granular, so that values of 0.5 and 2 are also included? Ideally I'm looking for this level of granularity, but don't mind if it is a bit less:
labels-desired

(2) What's the best way to put frequency information on the chart? I'd be happy with any one of the following:
(a) Shapes (e.g. circle and cross) on the start and end of the plotted curve, and equal distance (or step) dots on the curve,
(b) Ability to drop a marker with a label anywhere on the curve
(c) Ability to drag a cursor that sits on the curve
For (a), I have tried to use the update_scParam function (on line 25 of my code), but I don't see an 'o' and 'x' at the start and end of the generated chart. For (b) and (c) I was wondering if you had any suggestions; I'm just a Python beginner so any pointers would be appreciated. I tried an attempt at (c) using a SnappingCursor example on the matplotlib website, my Python attempt is here. It fails on line 87 due to this:

Traceback (most recent call last):
  File "C:\development\smith_chart\plot_s1p.py", line 87, in <module>
    snap_cursor = SnappingCursor(ax, line)
                  ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\development\smith_chart\plot_s1p.py", line 30, in __init__
    self.x, self.y = line.get_data()
                     ^^^^^^^^^^^^^
AttributeError: 'list' object has no attribute 'get_data'

Many thanks for all your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant