Axis scale erorr
See original GitHub issueDear all,
Is it possible to scale x-axis? No problem on y-axis…
# Plot the data points on an interactive axis
points = alt.Chart(df).mark_circle(color='black').encode(
x=alt.X('Year:Q', title='Year', axis=alt.Axis(titlePadding=10, format = 'd', tickCount=15),
scale=Scale(domain=[1984, 2019])),
y=alt.Y('Number of rainy days', title='Number of rainy days', axis=alt.Axis(titlePadding=10)))
bar_linear = alt.Chart(prediction_df).transform_fold(
['Linear regression '],
as_=['degree', 'yfit']
).mark_line().encode(
x=alt.X('Year:Q', scale=Scale(domain=[1984, 2019])),
y=alt.Y('Linear regression'),
color = alt.Color('degree:N', title = 'Type of regression')
)
# Plot the best fit polynomials
polynomial_fit = alt.Chart(wet_days_df).transform_fold(
['Cubic spline'],
as_=['degree', 'yfit']
).mark_line().encode(
x= alt.X('xfit:Q', scale=Scale(domain=[1984, 2019])),
y= alt.Y('yfit:Q'),
color = alt.Color('degree:N', title = 'Type of regression', scale=alt.Scale(range=['#d62728', '#1f77b4']))
)
points.properties(width=700, height=400) + polynomial_fit + bar_linear
**SchemaValidationError: Invalid specification
altair.vegalite.v4.schema.core.Axis, validating 'additionalProperties'
Additional properties are not allowed ('scale' was unexpected)**
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Scaling X axis error and need help adding "%" symbol to X ...
I am trying to scale the X axis from 3 to 5 by 0.5, but whenever I try using scale_x_continuous or discrete I...
Read more >Mutliple Y axis scale error with brush · Issue #737 - GitHub
I expect the first Y axis has the correct scale. What is happening instead? The first Y axis has the same scale as...
Read more >How to fix Y axis scale - Microsoft Power BI Community
I have made two visuals showing the total number of orders and in both the totals are the same per date, but the...
Read more >How to Fix R Error: Discrete value supplied to continuous scale
This error occurs when you attempt to apply a continuous scale to an axis in ggplot2, yet the variable on that axis is...
Read more >ggcyto wrong axis scale?
As you can see, the values on x-axis are not correct. ... Error when plotting flow cytometry data • ... color scale ggcyto::autoplot...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, I see. If you pass
nice=False
to the scale, it should work the way you want.Sorry, thanks, closed! 😃