Skip to content

Commit

Permalink
Docs: spline width is a float, not an int
Browse files Browse the repository at this point in the history
  • Loading branch information
hmedina committed Oct 24, 2024
1 parent b85f4a3 commit 1582fad
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions KaSaAn/core/KappaContactMap.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 208,7 @@ def _define_bond_spline_points(bond_type_dict, init_graphic_struct) -> dict:
return graphic_bond_points


def _create_spline(point_dict: dict, spline_width: int = 3) -> mpp.PathPatch:
def _create_spline(point_dict: dict, spline_width: float = 3) -> mpp.PathPatch:
"""Create a spline object."""
path_data = [
(matplotlib.path.Path.MOVETO, (point_dict['a_x'], point_dict['a_y'])),
Expand Down Expand Up @@ -478,7 478,7 @@ def resize_wedges_of(self, agent_name: str, new_size: float):
self._agent_graphics[agent_name]['flagpole_loc']['width'] = new_size / old_ratio
self._bond_spline_points = _define_bond_spline_points(self._bond_types, self._agent_graphics)

def draw(self, target_axis: mpa.Axes, draw_state_flagpole: bool = True, bond_width: int = 3):
def draw(self, target_axis: mpa.Axes, draw_state_flagpole: bool = True, bond_width: float = 3):
"""Draw the contact map onto the supplied axis. If `draw_state_flagpole` is `True`, the flagpole will display
all internal state data. If `False`, it will only display a summary with the number of sites omitted. By
default, agents are positioned in a square grid, spaced 10 units apart, on the 1st quadrant (e.g. four agents
Expand Down
6 changes: 3 additions & 3 deletions docs/KaSaAn/core/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1286,7 1286,7 @@ <h3>Methods</h3>
self._agent_graphics[agent_name][&#39;flagpole_loc&#39;][&#39;width&#39;] = new_size / old_ratio
self._bond_spline_points = _define_bond_spline_points(self._bond_types, self._agent_graphics)

def draw(self, target_axis: mpa.Axes, draw_state_flagpole: bool = True, bond_width: int = 3):
def draw(self, target_axis: mpa.Axes, draw_state_flagpole: bool = True, bond_width: float = 3):
&#34;&#34;&#34;Draw the contact map onto the supplied axis. If `draw_state_flagpole` is `True`, the flagpole will display
all internal state data. If `False`, it will only display a summary with the number of sites omitted. By
default, agents are positioned in a square grid, spaced 10 units apart, on the 1st quadrant (e.g. four agents
Expand Down Expand Up @@ -1549,7 1549,7 @@ <h3>Methods</h3>
<h3>Methods</h3>
<dl>
<dt id="KaSaAn.core.KappaContactMap.draw"><code class="name flex">
<span>def <span class="ident">draw</span></span>(<span>self, target_axis: matplotlib.axes._axes.Axes, draw_state_flagpole: bool = True, bond_width: int = 3)</span>
<span>def <span class="ident">draw</span></span>(<span>self, target_axis: matplotlib.axes._axes.Axes, draw_state_flagpole: bool = True, bond_width: float = 3)</span>
</code></dt>
<dd>
<div class="desc"><p>Draw the contact map onto the supplied axis. If <code>draw_state_flagpole</code> is <code>True</code>, the flagpole will display
Expand All @@ -1560,7 1560,7 @@ <h3>Methods</h3>
<summary>
<span>Expand source code</span>
</summary>
<pre><code class="python">def draw(self, target_axis: mpa.Axes, draw_state_flagpole: bool = True, bond_width: int = 3):
<pre><code class="python">def draw(self, target_axis: mpa.Axes, draw_state_flagpole: bool = True, bond_width: float = 3):
&#34;&#34;&#34;Draw the contact map onto the supplied axis. If `draw_state_flagpole` is `True`, the flagpole will display
all internal state data. If `False`, it will only display a summary with the number of sites omitted. By
default, agents are positioned in a square grid, spaced 10 units apart, on the 1st quadrant (e.g. four agents
Expand Down

0 comments on commit 1582fad

Please sign in to comment.