Skip to content

Commit 7577253

Browse files
committed
1 parent cab9992 commit 7577253

71 files changed

Lines changed: 228 additions & 226 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/main/_downloads/51e1acba23be3887d1c2302d00fea961/phasorpy_logo.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
},
5959
"outputs": [],
6060
"source": [
61-
"semicircle_color = 'tab:blue'\ncursor_color = 'tab:blue'\nsignal_color = 'tab:orange'\nharmonic_color = 'tab:green'\narrow_color = None # set to show arrow\nbackground_color = None # set to fill circle\nlinewidth = 25\n\nfig, ax = pyplot.subplots(figsize=(6.4, 6.4))\nax.set_axis_off()\n\nplot = PhasorPlot(ax=ax, xlim=(-0.04, 1.04), ylim=(-0.55, 0.55), title=None)\n\nplot.semicircle(\n frequency=frequency,\n lifetime=[], # turn off ticks\n color=semicircle_color,\n linewidth=linewidth,\n capstyle='round',\n)\n\n# draw cursor around phasor coordinate of mixture\nplot.cursor(*phasor, radius=0.08, linewidth=linewidth, color=cursor_color)\n\n# draw time-domain signal in inset\ncax = ax.inset_axes((0.015, 0.325, 0.97, 0.45))\ncax.set_ylim(0.02, 1.1)\ncax.set_axis_off()\ncax.plot(\n times,\n signal,\n '-',\n color=signal_color,\n linewidth=linewidth,\n solid_capstyle='round',\n)\n\n# draw harmonics in second inset\ncax = ax.inset_axes((0.125, 0.113, 0.75, 0.25))\ncax.set_ylim(-0.11, 1.14)\ncax.set_axis_off()\ncax.plot(\n times,\n harmonic,\n '-',\n color=harmonic_color,\n linewidth=linewidth,\n solid_capstyle='round',\n)\n\n# draw arrow indicating phasor transformation\nif arrow_color is not None:\n point = 0.28, -0.04\n length = 0.46, 0.74\n plot.arrow(\n [\n point[0] + length[0] * (phasor[0] - point[0]),\n point[1] + length[0] * (phasor[1] - point[1]),\n ],\n [\n point[0] + length[1] * (phasor[0] - point[0]),\n point[1] + length[1] * (phasor[1] - point[1]),\n ],\n color=arrow_color,\n linewidth=linewidth,\n )\n\n# draw circle outline\nif background_color is not None:\n plot.circle(\n 0.5,\n 0.0,\n 0.5,\n color=background_color,\n linewidth=linewidth,\n linestyle='-',\n fill=True,\n zorder=0,\n )\n\npyplot.tight_layout(pad=0.0, w_pad=0.0, h_pad=0.0)\n\n# save the figure to a SVG file:\nplot.save('phasorpy_logo.svg', dpi=160, transparent=True, bbox_inches='tight')\nplot.show()"
61+
"semicircle_color = 'tab:blue'\ncursor_color = 'tab:blue'\nsignal_color = 'tab:orange'\nharmonic_color = 'tab:green'\narrow_color = None # set to show arrow\nbackground_color = None # set to fill circle\nlinewidth = 25\n\nfig, ax = pyplot.subplots(figsize=(6.4, 6.4))\nax.set_axis_off()\n\nplot = PhasorPlot(ax=ax, xlim=(-0.04, 1.04), ylim=(-0.55, 0.55), title=None)\n\nplot.semicircle(\n frequency=frequency,\n lifetime=[], # turn off ticks\n color=semicircle_color,\n linewidth=linewidth,\n capstyle='round',\n)\n\n# draw cursor around phasor coordinate of mixture\nplot.cursor(*phasor, radius=0.08, linewidth=linewidth, color=cursor_color)\n\n# draw time-domain signal in inset\ncax = ax.inset_axes((0.015, 0.325, 0.97, 0.45))\ncax.set_ylim(0.02, 1.1)\ncax.set_axis_off()\ncax.plot(\n times,\n signal,\n '-',\n color=signal_color,\n linewidth=linewidth,\n solid_capstyle='round',\n)\n\n# draw harmonics in second inset\ncax = ax.inset_axes((0.125, 0.113, 0.75, 0.25))\ncax.set_ylim(-0.11, 1.14)\ncax.set_axis_off()\ncax.plot(\n times,\n harmonic,\n '-',\n color=harmonic_color,\n linewidth=linewidth,\n solid_capstyle='round',\n)\n\n# draw arrow indicating phasor transformation\nif arrow_color is not None:\n point = 0.28, -0.04\n length = 0.46, 0.74\n plot.arrow(\n [\n point[0] + length[0] * (phasor[0] - point[0]),\n point[1] + length[0] * (phasor[1] - point[1]),\n ],\n [\n point[0] + length[1] * (phasor[0] - point[0]),\n point[1] + length[1] * (phasor[1] - point[1]),\n ],\n color=arrow_color,\n linewidth=linewidth,\n )\n\n# draw circle outline\nif background_color is not None:\n plot.circle(\n 0.5,\n 0.0,\n 0.5,\n color=background_color,\n linewidth=linewidth,\n linestyle='-',\n fill=True,\n zorder=0,\n )\n\npyplot.tight_layout(pad=0.0, w_pad=0.0, h_pad=0.0)\n\n# save the figure to an SVG file:\nplot.save('phasorpy_logo.svg', dpi=160, transparent=True, bbox_inches='tight')\nplot.show()"
6262
]
6363
},
6464
{
Binary file not shown.

docs/main/_downloads/5ceb3605f152ffa97abde4f00e217059/phasorpy_logo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133

134134
pyplot.tight_layout(pad=0.0, w_pad=0.0, h_pad=0.0)
135135

136-
# save the figure to a SVG file:
136+
# save the figure to an SVG file:
137137
plot.save('phasorpy_logo.svg', dpi=160, transparent=True, bbox_inches='tight')
138138
plot.show()
139139

0 commit comments

Comments
 (0)