Skip to content
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

Axis should have option to have a fixed orientation #113

Closed
pzwang opened this issue Oct 15, 2013 · 7 comments
Closed

Axis should have option to have a fixed orientation #113

pzwang opened this issue Oct 15, 2013 · 7 comments

Comments

@pzwang
Copy link

@pzwang pzwang commented Oct 15, 2013

Right now axes determine the orientation of the "In" vector based on which side of the plot they're on. For axis locations of "min" or "max", that's OK, but when a plot has a fixed position in dataspace, then it should be able to have a fixed orientation, i.e. tick labels are always above/below or always left/right of the axis.

@kdodia
Copy link
Contributor

@kdodia kdodia commented Aug 27, 2014

@bryevdv I don't know the guts of BokehJS well enough, but I'm pretty sure this is no longer applicable. Am I correct in thinking so?

Loading

@damianavila damianavila added this to the long-term milestone Oct 13, 2014
@bryevdv
Copy link
Member

@bryevdv bryevdv commented Oct 20, 2014

Yes and no... It's no longer applicable because the ability to position axes at fixed data space coordinates is currently removed. But, it should be added back at some point when we can figure out how to make it work.

Loading

@pzwang
Copy link
Author

@pzwang pzwang commented Oct 21, 2014

When we can figure out how to make it work

What problem exactly needs to be figured out?

Loading

@bryevdv
Copy link
Member

@bryevdv bryevdv commented Oct 21, 2014

There's a tension with the current layout system capabilities and what can be spelled.

Loading

@bryevdv bryevdv added this to the 0.12.5 milestone Dec 31, 2016
@bryevdv bryevdv removed this from the long-term milestone Dec 31, 2016
@bryevdv bryevdv added this to the 0.12.6 milestone Feb 1, 2017
@bryevdv bryevdv removed this from the 0.12.5 milestone Feb 1, 2017
@bryevdv bryevdv added this to the 0.12.7 milestone May 30, 2017
@bryevdv bryevdv removed this from the 0.12.6 milestone May 30, 2017
@bryevdv
Copy link
Member

@bryevdv bryevdv commented May 30, 2017

I actually don't think this will be terrible to implement at this point but there are too many bugs left to fix for 0.12.6, moving to next milestone

Loading

@bryevdv bryevdv removed this from the 0.12.7 milestone Jul 30, 2017
@bryevdv bryevdv added this to the 0.12.8 milestone Jul 30, 2017
@bryevdv bryevdv added this to the 0.12.8 milestone Jul 30, 2017
@bryevdv bryevdv removed this from the 0.12.7 milestone Jul 30, 2017
@mattpap mattpap added this to Triage in Focus: Layout Nov 7, 2017
@bryevdv bryevdv removed this from the 0.12.x milestone Mar 17, 2018
@bryevdv bryevdv added this to the 0.12.16 milestone Mar 17, 2018
@bryevdv
Copy link
Member

@bryevdv bryevdv commented Apr 8, 2018

Just hard coding loc to return 0 demonstrates that things already "sort of work":

screen shot 2018-04-08 at 15 41 03

As it stands, there is extra padding for the vacant-but-still-present side panels, and also the axes are not clipped at the inner plot boundary. So I would propose to add an optional fixed_location property to Axis that is what loc returns (if it is set). Then fix up other code paths so that:

  • if there is a fixed location, the axis is added to a render level that gets clipped
  • if there is a fixed location, the side panel width/height is collapsed to zero

To be clear, this is a slight abuse of side panels, but anything else would seem to be much more work. In particular, keeping the side panel, and adding the axis to a layout on a side, provides an immediate, already working way to specify which "side" of the axis the tick labels should be drawn on. Otherewise we would need new dedicated properties for those, and then to also figure out interactions with all the existing properties.

We could also consider an add_axis method to plot that would be a little more comprehensible to users than add_layout.

Loading

@bryevdv
Copy link
Member

@bryevdv bryevdv commented Apr 24, 2018

With the merged PR:

screen shot 2018-04-24 at 11 50 29

(works with categorical coordinates as well)

Loading

@bryevdv bryevdv removed this from Triage in Focus: Layout Jun 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants