Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions news/fix_image_crop.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
**Added:**

* <news item>

**Changed:**

* <news item>

**Deprecated:**

* <news item>

**Removed:**

* <news item>

**Fixed:**

* Fixed bug in ligand network visualization (such as with ``openfe view-ligand-network``) so that ligand names are no longer cut off by the plot border (`PR 1822 <https://github.com/OpenFreeEnergy/openfe/pull/1822>`_).

**Security:**

* <news item>
12 changes: 9 additions & 3 deletions src/openfe/utils/atommapping_network_plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def xy(self):

class AtomMappingNetworkDrawing(GraphDrawing):
"""
Class for drawing atom mappings from a provided ligang network.
Class for drawing atom mappings from a provided ligand network.

Parameters
----------
Expand All @@ -167,6 +167,12 @@ def plot_atommapping_network(network: LigandNetwork):
Returns
-------
:class:`matplotlib.figure.Figure` :
the matplotlib figure containing the iteractive visualization
the matplotlib figure containing the interactive visualization
"""
return AtomMappingNetworkDrawing(network.graph).fig
fig = AtomMappingNetworkDrawing(network.graph).fig
axes = fig.axes
for ax in axes:
ax.set_frame_on(False) # remove the black frame
for t in ax.texts:
t.set_clip_on(False) # do not clip the label in the network plot
return fig
Loading