Skip to content

Commit

Permalink
fix legend position (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
vestalisvirginis authored Jan 13, 2024
1 parent 4176b2f commit fd4fbe4
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
8 changes: 4 additions & 4 deletions synphage/assets/viewer/static_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,8 +504,8 @@ def create_graph(

context.log.info(f"W: {width}, H: {height}")

xpos = int(math.trunc(width * 0.6))
ypos = int(math.trunc(height * 0.9))
xpos = int(math.trunc(width * 0.68))
ypos = int(math.trunc(height * 0.99))
context.log.info(f"Coord of SVG: {str(xpos)} : {str(ypos)}")

# Prepare legend:
Expand Down Expand Up @@ -544,8 +544,8 @@ def create_graph(
C.Figure(
f"{width}px",
f"{height}px",
C.SVG(_path_output),
C.SVG(legend_path).move(xpos, ypos),
C.SVG(_path_output).scale(0.96),
C.SVG(legend_path).move(xpos, ypos).scale(0.9),
).save(_path_output)

svg2png(bytestring=open(_path_output).read(), write_to=_png_output)
Expand Down
19 changes: 10 additions & 9 deletions synphage/assets/viewer/template.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit fd4fbe4

Please sign in to comment.