Skip to content

[Documentation] Clarify x0,y0 in image trace #6501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions src/traces/image/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,24 @@ module.exports = extendFlat({
valType: 'any',
dflt: 0,
editType: 'calc+clearAxisTypes',
description: 'Set the image\'s x position.'
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'
].join(' ')
},
y0: {
valType: 'any',
dflt: 0,
editType: 'calc+clearAxisTypes',
description: 'Set the image\'s y position.'
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.'
].join(' ')
},
dx: {
valType: 'number',
Expand Down
4 changes: 2 additions & 2 deletions test/plot-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -35043,7 +35043,7 @@
]
},
"x0": {
"description": "Set the image's x position.",
"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",
"dflt": 0,
"editType": "calc+clearAxisTypes",
"valType": "any"
Expand All @@ -35055,7 +35055,7 @@
"valType": "subplotid"
},
"y0": {
"description": "Set the image's y position.",
"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.",
"dflt": 0,
"editType": "calc+clearAxisTypes",
"valType": "any"
Expand Down