-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add ticklabelstandoff
and ticklabelshift
to cartesian axes
#7006
Conversation
Also modifies mock date_axes_period2 to test the new properties
Co-authored-by: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com>
…polar, smith, ternary
Help appreciated for these failing bundle tests (I failed to get the debugger running for this).
|
Nvm, I figured it out, print debugging ftw :) |
…ks → calc carpet is a trace and therefore doesn't support editType ticks
@@ -698,6 +698,22 @@ module.exports = { | |||
'In other cases the default is *hide past div*.' | |||
].join(' ') | |||
}, | |||
ticklabelshiftx: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering where we should put the x
or y
in the attribute names?
In #7005 we have xshift
, here we have shiftx
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, true. in #7005 my reasoning was that in the shape properties we have x0, x1 and xref. So I added xshift.
Here I had a similar reasoning, there were already properties starting with ticklabel*. And since in ticklabelxshift
it is maybe hard to make out the 'x', I moved it to the end…
No strong opinion here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHo we shouldn't use x
and y
in these attribute names.
Instead something like standoff
and runoff
could be used so that when switching the orientation e.g. on a colorbar from horizontal to vertical everything works without a need to adjusting these parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed to ticklabelrunoff (shifts in parallel to axis) and ticklabelstandoff (shifts orthogonally to axis)
Separate test mock will follow
And remove this feature from all non-cartesian traces. If other plots should be supported, this can be added and tested in separate PRs.
…axis.side and ticklabelposition. Standoff moves labels farther outside for outside labels and farther inside for inside labels. Runoff moves labels further along the axis range.
Failing mapbox test appears to be unrelated to my changes. It looks good locally. |
To fix it, please fetch |
The mapbox PR was already merged before, see here: 4ccaf73 |
ticklabelstandoff
and ticklabelrunoff
to cartesian axesticklabelstandoff
and ticklabelshift
to cartesian axes
I checked with @LiamConnors and @emilykl and they both suggested to use |
@my-tien This PR is looking very good. |
@archmoj : Thanks for the mention. No, no particular figure in mind. It's a very general use case. |
Update draftlog for renaming of `ticklabelrunoff` to `ticklabelshift` Co-authored-by: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com>
(no need to test if ax.side matches axis, because this check is done before)
@my-tien Just few fixes needed by you here (see my recent comments) and we should be good to merge it today! |
Improve draftlog text for ticklabelstandoff and ticklabelshift Co-authored-by: Mojtaba Samimi <33888540+archmoj@users.noreply.github.com>
…d move outside and outside ticks could move inside
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
These properties shift the axis tick labels in parallel or orthogonally to the axis (in pixels).
Resolves #1673
Disclaimer
I am required to add that…the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. in no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.