Implemented PlotSize transform according to scale parameter
@@ -256,9 +256,16 @@ class PlotSize(Stream):
Returns the dimensions of a plot once it has been displayed.
"""
- width = param.Integer(300, doc="The width of the plot in pixels")
+ width = param.Integer(300, constant=True, doc="The width of the plot in pixels")
- height = param.Integer(300, doc="The height of the plot in pixels")
+ height = param.Integer(300, constant=True, doc="The height of the plot in pixels")
+
+ scale = param.Number(default=1.0, constant=True, doc="""
+ Scale factor to scale width and height values reported by the stream""")
+
+ def transform(self):
+ return {'width': int(self.width * self.scale),
+ 'height': int(self.width * self.scale)}
class RangeXY(Stream):
