Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fix the issue #422
To fix this I have proposed a new optional parameter called
'DomainFactor'
. This parameter scales each of the domain components of the plotly chart.The domain or position of a chart box is defined by a 4-element vector, namely:
domain = [xo, yo, w, h]
where:
xo
: the initial x-coordinate of the chart (referred to the left-bottom)yo
: the initial y-coordinate of the chart (referred to the left-bottom)w
: is the width of the charth
: is the height of the chartThen the
'DomainFactor'
parameter must be a vector of 4-elements at most, in which each of its elements will scale to each of the elements of the chart's domain.Example: Without scaling
In this example we have not set the optional DomainFactor parameter, therefore, the domain of the chart will not be scaled, which will result in:
Example: set DomianFactor to scaling
In this case we have set the
'DomainFactor'
parameter as[0.2, 1, 0.9, 0.9]
and like this:xo
will be scaled by a factor of0.2
yo
will scale by a factor of1
(it will stay the same)w
: the width of the chart will be scaled by a factor of0.9
h
: the height of the chart will be scaled by a factor of0.9
Here I share the result: