MCPcopy Index your code
hub / github.com/SLiCAP/SLiCAP_python / trace

Class trace

SLiCAP/SLiCAPplots.py:18–132  ·  view source on GitHub ↗

Trace prototype. Traces are plotted on axes, which are part of a figure. :param traceData: list with list array-like X and Y data of the trace. :type traceData: list :Example: >>> x_data = np.linspace(0, 2*np.pi, 50) >>> y_data = np.sin(x_data) >>> sin_trace = tr

Source from the content-addressed store, hash-verified

16plt.ioff() # Turn off the interactive mode for plotting
17
18class trace(object):
19 """
20 Trace prototype.
21
22 Traces are plotted on axes, which are part of a figure.
23
24 :param traceData: list with list array-like X and Y data of the trace.
25 :type traceData: list
26
27 :Example:
28
29 >>> x_data = np.linspace(0, 2*np.pi, 50)
30 >>> y_data = np.sin(x_data)
31 >>> sin_trace = trace([x_data, y_data])
32 """
33 def __init__(self, traceData):
34 self.xData = np.array(traceData[0])
35 """
36 Array-like data for the x-axis of the trace. On a polar axes this is
37 the angle in radians.
38 """
39
40 self.yData = np.array(traceData[1])
41 """
42 Array-like data for the y-axis of the trace. On a polar axes this is
43 the radius.
44 """
45
46 try:
47 if len(self.xData) != len(self.yData):
48 print('Error in plot data.')
49 except:
50 pass
51
52 self.xName = 'x'
53 """
54 Heading (*str*) for the x column of a table. Defaults to 'x'.
55 """
56
57 self.yName = 'y'
58 """
59 Heading (*str*) for the y column of a table. Defaults to 'y'.
60 """
61
62 self.label = ''
63 """
64 Trace label (*str*) that will be displayed in legend box. Defaults to ''.
65 """
66
67 self.color = False
68 """
69 Trace color (*str*) in matplotlib format. Defaults to False.
70 """
71
72 self.marker = False
73 """
74 Marker type (*str*) in matplotlib format. Defaults to False.
75 """

Callers 11

_makeOPtracesFunction · 0.90
_makeDCTRNStracesFunction · 0.90
_makeACtracesFunction · 0.90
plotSweepFunction · 0.85
plotPZFunction · 0.85
plotFunction · 0.85
LTspiceData2TracesFunction · 0.85
LTspiceAC2SLiCAPtracesFunction · 0.85
csv2tracesFunction · 0.85
Cadence2tracesFunction · 0.85
SLiCAPplots.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected