Limitation of ticks
See original GitHub issueHello,
I have an issue of the ticks on the x-axis, which contains 365 (366) ticks. If I download the bar chart in SVG and open in Google Chrome - There is no issue with visualisation and there are only a few ticks. However, If I open it in Affinity Designer, the ticks on x-axis are one big mess… Is there some solution about how to limit the number of ticks on axis? Thank you!
My (minimal) dataset is:
# Packages
import datetime
import os, sys
import pandas as pd
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import matplotlib.ticker as plticker
import altair as alt
from vega_datasets import data
data = {'DAY' : ['2019-05-01', '2019-05-02', '2019-05-03', '2019-05-04', '2019-05-05'],
'RAIN' : [0.9, 0.9, 0.9, 0.9, 0.9],
'RR_MIDDLE' : [2.80, 2.80, 2.80, 2.80, 2.80],
'CONDITION_RR' : ['wet', 'wet', 'wet', 'wet', 'wet'],
'CONDITION_PR' : ['dry', 'dry', 'dry', 'dry', 'dry'],
'SEASON' : ['Intermittent_Season', 'Dry_Season', 'Intermittent_Season', 'Wet_Season', 'Intermittent_Season'],
'MONTH' : ['Apr 2019', 'Apr 2019', 'Apr 2019', 'Apr 2019', 'Apr 2019'],
'SEASON_NUM' : [1.0, 1.0, 1.0, 1.0, 1.0],
'YEAR' : [2019, 2019, 2019, 2019, 2019],
'DOY' : [121, 122, 123, 124, 125],
}
RSDF9 = pd.DataFrame(data)
RSDF9['DAY'] = pd.to_datetime(RSDF9['DAY'], errors='ignore')
pd.to_numeric(RSDF9['DOY'])
pd.to_numeric(RSDF9['YEAR'])
alt.renderers.enable('notebook')
alt.data_transformers.disable_max_rows()
bar2 = alt.Chart(RSDF9).mark_bar().encode(
alt.X('DOY:O', title='day', axis=alt.Axis(tickCount=2)),
alt.Y('year(DAY):O', title='year'),
color='SEASON:N',
order=alt.Order("SEASON", sort="ascending")
)
(bar2).properties(width=600).configure_axisX(labelAlign="right", labelAngle=-45, labelPadding=8)
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Current Limitations in the Control and Spread of Ticks ... - MDPI
This paper reviews the current knowledge regarding the spread of ticks with their impact in animal health and the limitations to achieve effective...
Read more >Review: Importance of ticks and their chemical and ... - NCBI
Feeding by large numbers of ticks causes reduction in live weight and anemia among domestic animals, while tick bites also reduce the quality...
Read more >Current Limitations in the Control and Spread ... - ResearchGate
Ticks are well-known parasites that affect livestock productivity. This paper reviews the current knowledge regarding the spread of ticks ...
Read more >Tick infestation on medium–large-sized mammalian hosts
Understanding how different species of hosts limit the tick population is crucial for management. In general, larger ectoparasites are ...
Read more >The distribution limit of the common tick, Ixodes ricinus, and ...
ricinus. The present study suggests that the threshold GSL for tick establishment is about 170 days, because the median GSL from 1991 to...
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
I’m closing, because it’s been a few months without response. Let me know if you have further questions.
OK - if you can create a reproducible example that reflects the problem you’re seeing, I"m happy to try and help.