Commit d6ec1f25 authored by Yori 'AGy' Fournier's avatar Yori 'AGy' Fournier
Browse files

correct the forceRatioOnWidth/Height bug

parent 3ca89089
......@@ -76,13 +76,17 @@ class MyAxes(Axes):
# get the frame allowed
framePosX, framePosY, frameWidth, frameHeight = frameRect
# get the size of the figure
figWidth = self.fig.get_figwidth()
figHeight = self.fig.get_figheight()
if(forceRatioOnWidth):
rect = [framePosX, framePosY, frameHeight/ratio, frameHeight]
frameWidth = ratio * figWidth / (frameHeight * figHeight)
elif(forceRatioOnHeight):
rect = [framePosX, framePosY, frameWidth, frameWidth*ratio]
else:
rect = [framePosX, framePosY, frameWidth, frameHeight]
frameHeight = ratio * (frameWidth * figWidth) / figHeight
rect = [framePosX, framePosY, frameWidth, frameHeight]
return(rect)
# DECLARE KEYWORDS -------------------------------------------------
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment