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

Comments

Projects
None yet
5 participants
@pzwang
Copy link

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

This comment has been minimized.

Copy link
Contributor

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?

@damianavila damianavila added this to the long-term milestone Oct 13, 2014

@bryevdv

This comment has been minimized.

Copy link
Member

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.

@pzwang

This comment has been minimized.

Copy link
Author

pzwang commented Oct 21, 2014

When we can figure out how to make it work

What problem exactly needs to be figured out?

@bryevdv

This comment has been minimized.

Copy link
Member

bryevdv commented Oct 21, 2014

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

@bryevdv bryevdv modified the milestones: 0.12.5, long-term Dec 31, 2016

@bryevdv bryevdv modified the milestones: 0.12.6, 0.12.5 Feb 1, 2017

@bryevdv bryevdv modified the milestones: 0.12.7, 0.12.6 May 30, 2017

@bryevdv

This comment has been minimized.

Copy link
Member

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

@bryevdv bryevdv modified the milestones: 0.12.7, 0.12.8 Jul 30, 2017

@mattpap mattpap added the tag: layout label Nov 7, 2017

@mattpap mattpap added this to Triage in Focus: Layout Nov 7, 2017

@bryevdv bryevdv modified the milestones: 0.12.x, 0.12.16 Mar 17, 2018

@bryevdv

This comment has been minimized.

Copy link
Member

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.

@bryevdv

This comment has been minimized.

Copy link
Member

bryevdv commented Apr 24, 2018

With the merged PR:

screen shot 2018-04-24 at 11 50 29

(works with categorical coordinates as well)

@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
You can’t perform that action at this time.