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

Docs: Modifying scale of "multiple interactions" example and adding legend adjustments #3350

Merged
merged 4 commits into from
Mar 6, 2024

Commits on Mar 3, 2024

  1. Update multiple_interactions.py

    This is an attempt to modify the original "multiple interaction" example from the Altair-Vega documentation website. I had experimented with the example on my own to see how the Altair-Vega syntax worked when I realized that the quantitative scale for the alt.Size argument regarding a film's big budget designation wasn't fully accurate considering how the variable is entered. From what I read, the initial transformation in the chart creation creates a nominal scale between two categories of films, which can be labelled as "big budget" and "not big budget." However, the default scale being set to quantitative for this variable means that the scale incorrectly assumes that the values of "100" and "10" (for big budget and non big-budget films respectively) are within a quantitative scale which then suggests to the viewer that it is displaying a continuous scale of films (via dot size) relative to production budget between $20 mil to $100 mil when the "Big Budget Films" box is checked.
    
    I'm not sure if this is intentional to showcase how ':Q' automatically adjusts the scale when given any potential range of data, but if it is not I think it would be best to modify the scale and legend of this to be nominal in nature to clarify the nature of the Big Budget Film checkbox. This modified version assigns '1' to films above $100 mil in budget and '0' for films vice versa so that, with a 0 -> 1 scale, alt.Scale will give a smaller mark size for lower-budget films before scaling up for big-budget films. I also include an example of how legends can be manually adjusted by adding a title and a defined range for mark size increase (from 25 to 150) between films below and above $100 mil.
    d-trigo authored Mar 3, 2024
    Configuration menu
    Copy the full SHA
    95128b0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    28c91f4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3476b0d View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2024

  1. Simplify logic

    joelostblom authored Mar 5, 2024
    Configuration menu
    Copy the full SHA
    febf3ed View commit details
    Browse the repository at this point in the history