Skip to content

Commit ec13ee1

Browse files
authored
Merge pull request #6501 from zeehio/patch-1
[Documentation] Clarify x0,y0 in image trace
2 parents cc88162 + 80d612e commit ec13ee1

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

src/traces/image/attributes.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,24 @@ module.exports = extendFlat({
8484
valType: 'any',
8585
dflt: 0,
8686
editType: 'calc+clearAxisTypes',
87-
description: 'Set the image\'s x position.'
87+
description: [
88+
'Set the image\'s x position. The left edge of the image',
89+
'(or the right edge if the x axis is reversed or dx is negative)',
90+
'will be found at xmin=x0-dx/2'
91+
].join(' ')
8892
},
8993
y0: {
9094
valType: 'any',
9195
dflt: 0,
9296
editType: 'calc+clearAxisTypes',
93-
description: 'Set the image\'s y position.'
97+
description: [
98+
'Set the image\'s y position. The top edge of the image',
99+
'(or the bottom edge if the y axis is NOT reversed or if dy is negative)',
100+
'will be found at ymin=y0-dy/2. By default when an image trace is',
101+
'included, the y axis will be reversed so that the image is right-side-up,',
102+
'but you can disable this by setting yaxis.autorange=true or by providing',
103+
'an explicit y axis range.'
104+
].join(' ')
94105
},
95106
dx: {
96107
valType: 'number',

test/plot-schema.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -35630,7 +35630,7 @@
3563035630
]
3563135631
},
3563235632
"x0": {
35633-
"description": "Set the image's x position.",
35633+
"description": "Set the image's x position. The left edge of the image (or the right edge if the x axis is reversed or dx is negative) will be found at xmin=x0-dx/2",
3563435634
"dflt": 0,
3563535635
"editType": "calc+clearAxisTypes",
3563635636
"valType": "any"
@@ -35642,7 +35642,7 @@
3564235642
"valType": "subplotid"
3564335643
},
3564435644
"y0": {
35645-
"description": "Set the image's y position.",
35645+
"description": "Set the image's y position. The top edge of the image (or the bottom edge if the y axis is NOT reversed or if dy is negative) will be found at ymin=y0-dy/2. By default when an image trace is included, the y axis will be reversed so that the image is right-side-up, but you can disable this by setting yaxis.autorange=true or by providing an explicit y axis range.",
3564635646
"dflt": 0,
3564735647
"editType": "calc+clearAxisTypes",
3564835648
"valType": "any"

0 commit comments

Comments
 (0)