Skip to content

Visual tests fail with scales 1.0 #2824

Closed

Description

@clauswilke

I updated to scales 1.0 and now numerous visual tests fail. I could just accept them but I think it would be good if somebody who has worked on scales could look them over to make sure it's all good. Most noticeable are substantial changes in default data ranges for data sets with only a single x or y value (see screenshots).

Before:
screen shot 2018-08-10 at 9 01 39 pm

After:
screen shot 2018-08-10 at 9 01 46 pm

Before:
screen shot 2018-08-10 at 8 59 03 pm

After:
screen shot 2018-08-10 at 8 58 47 pm

Activity

  1. dpseidel commented on Aug 19, 2018

    @dpseidel
    Collaborator

    So I expect both the failures above come from our fix to #2281 in r-lib/scales#161 -- the behavior is as expected for zero range discrete scales and a little surprising for the continuous scale, I'll look into both to confirm. Presumably because of the same or similar reason why visual tests weren't running on travis, tests on my system weren't showing any failures at all until I updated my version of vdiffr this morning. Now that I can actually see the failures, I'll look them over and get a sense of what are expected changes and if there is anything to be concerned about.

  2. clauswilke commented on Aug 19, 2018

    @clauswilke
    MemberAuthor

    It seems to me that the result for continuous scales is as expected given the change in
    r-lib/scales#161: You set the zero range to 1 and then expand by 5% in either direction, yielding a range of 0.95 to 1.05.

  3. dpseidel commented on Aug 19, 2018

    @dpseidel
    Collaborator

    Yep, it's behaving as expected by the change in code, I simply failed to consider the continuous scale defaults when making the change. I still think it's appropriate to have the mul and add parameters affect zero_range scales but @hadley should probably have a final say on whether this magnitude of a change in default behavior is appropriate.

    After review, scales PR161 was the source of almost all new failures. The rest were caused by changes to scales::log_breaks() and sec_axis() and should be validated.

  4. hadley commented on Aug 20, 2018

    @hadley
    Member

    Yeah, I think it makes a lot of sense - the previous values were pure magic, and now they arise from the scale expansion parameters.

  5. added a commit that references this issue on Aug 21, 2018
    4a14027
  6. lock commented on Feb 17, 2019

    @lock

    This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/

  7. locked and limited conversation to collaborators on Feb 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions