Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PySmithPlot/Polar Plot update broken in 2.1.2 (works in 2.0.2) #10654

Closed
Milestone
@chrisgmorton

Description

@chrisgmorton

Bug report

Bug summary

The smith chart grid is distorted in 2.1.2, correct in 2.0.2.
Updating the polar plot data blanks the plot in 2.1.2, updates properly in 2.0.2.

In both versions when I create the plots/lines I see:

/Users/chrisgmorton/usr/tcad/fusion/prod/lib/python3.6/site-packages/pysmithplot-0.2.0-py3.6.egg/smithplot/smithhelper.py:46: RuntimeWarning: divide by zero encountered in true_divide
/Users/chrisgmorton/usr/tcad/fusion/prod/lib/python3.6/site-packages/pysmithplot-0.2.0-py3.6.egg/smithplot/smithhelper.py:46: RuntimeWarning: invalid value encountered in true_divide
/Users/chrisgmorton/usr/tcad/fusion/prod/lib/python3.6/site-packages/matplotlib/projections/polar.py:58: RuntimeWarning: invalid value encountered in less
mask = r < 0

On the first update of the plots I see:

Users/chrisgmorton/usr/tcad/fusion/prod/lib/python3.6/site-packages/matplotlib/projections/polar.py:58: RuntimeWarning: invalid value encountered in less
mask = r < 0

and the polar plots are then blanked out (not so with 2.0.2).

Code for reproduction

Plots are built with:

self.axes=[]n=self.numberOfPortsfori,jinself.indices:ifi==j:self.axes.append(self.fig.add_subplot(n,n,1+i*2+j,projection='smith'))else:self.axes.append(self.fig.add_subplot(n,n,1+i*2+j,projection='polar'))fork,(i,j)inenumerate(self.indices):self.axes[k].tick_params(which='major',labelsize=10)self.fig.subplots_adjust(top=0.9)

Lines initialized with:

self.lines=[]form,(i,j)inenumerate(self.indices):ifi==j:# Smith ChartS=self.Splt.T[j,i].TZ= (1+S)/(1-S)# normalized impedance on Smith Chartself.lines.append(self.axes[m].plot(Z.T,color='b',marker='',markerfacecolor='b',markeredgecolor='b'))else:# Polar PlotS=self.Splt.T[j,i].Tself.lines.append(self.axes[m].plot(np.angle(S.T),np.absolute(S.T),color='r',marker='',markerfacecolor='r',markeredgecolor='r'))

Lines updated with:

fork,(i,j)inenumerate(self.indices):ifi==j:# Smith ChartS=self.Splt.T[j,i].TZ= (1+S)/(1-S)# normalized impedance on Smith Chart                [line.set_xdata(np.real(Z[idx]))foridx,lineinenumerate(self.lines[k])]                [line.set_ydata(np.imag(Z[idx]))foridx,lineinenumerate(self.lines[k])]else:# Polar PlotS=self.Splt.T[j,i].T                [line.set_xdata(np.angle(S[idx]))foridx,lineinenumerate(self.lines[k])]                [line.set_ydata(np.absolute(S[idx]))foridx,lineinenumerate(self.lines[k])]

Actual outcome

Matplotlib 2.1.2 output, on completion of simulation:

screen shot 2018-03-02 at 4 59 20 pm

Expected outcome

Matplotlib 2.0.2 output, on completion of simulation:

screen shot 2018-03-02 at 3 18 06 pm

Matplotlib version

  • Operating system: Ubuntu 16.04 and OSX 10.13.3
  • Matplotlib version: 2.1.2
  • Matplotlib backend: Qt5Agg (Qt5.10)
  • Python version: 3.6.4
  • PySmithPlot version: 0.2

Matplotlib installed using pip. Qt5 and PyQt5 built from source. Python 3.6.4 built from source.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp