Skip to content

Commit

Permalink
Fix PES figure generation in png format
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoruiDong committed Nov 4, 2019
1 parent a1f63f3 commit 9361445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rmgpy/pdep/draw.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def _draw_label(self, configuration, cr, x0, y0, file_format='pdf'):
def draw(self, network, file_format, path=None):
"""
Draw the potential energy surface for the given `network` as a Cairo
surface of the given `format`. If `path` is given, the surface is
surface of the given `file_format`. If `path` is given, the surface is
saved to that location on disk.
"""
try:
Expand Down Expand Up @@ -513,7 +513,7 @@ def draw(self, network, file_format, path=None):
self._draw_label(well, cr, x, y, file_format=file_format)

# Finish Cairo drawing
if format == 'png':
if file_format == 'png':
surface.write_to_png(path)
else:
surface.finish()

0 comments on commit 9361445

Please sign in to comment.