The default styles we use for each geom in case neither the user provides a setting nor a mapping
Consts
DefaultAlphaRange = (low: 0.1, high: 1.0)
- Source Edit
DefaultColorScale = (name: "viridis", colors: [4282646868'u, 4282647126'u, 4282713175'u, 4282713433'u, 4282779482'u, 4282779740'u, 4282780253'u, 4282780510'u, 4282846560'u, 4282846817'u, 4282847331'u, 4282847588'u, 4282848101'u, 4282913895'u, 4282914408'u, 4282914665'u, 4282914922'u, 4282915436'u, 4282915693'u, 4282915950'u, 4282916207'u, 4282916720'u, 4282916977'u, 4282917235'u, 4282917748'u, 4282918005'u, 4282918262'u, 4282918519'u, 4282919032'u, 4282919289'u, 4282854010'u, 4282854522'u, 4282854779'u, 4282855036'u, 4282855293'u, 4282790014'u, 4282790526'u, 4282790783'u, 4282791040'u, 4282725761'u, 4282726273'u, 4282726530'u, 4282661251'u, 4282661507'u, 4282661764'u, 4282596740'u, 4282596997'u, 4282531717'u, 4282531974'u, 4282532230'u, 4282466951'u, 4282467463'u, 4282402184'u, 4282402440'u, 4282337160'u, 4282337417'u, 4282272137'u, 4282272393'u, 4282272906'u, 4282207626'u, 4282207882'u, 4282142602'u, 4282142859'u, 4282077579'u, 4282077835'u, 4282012555'u, 4282012812'u, 4281947532'u, 4281947788'u, 4281882764'u, 4281883020'u, 4281817740'u, 4281817997'u, 4281752717'u, 4281752973'u, 4281687693'u, 4281687949'u, 4281622669'u, 4281622925'u, 4281557645'u, 4281557901'u, 4281492622'u, 4281492878'u, 4281427598'u, 4281427854'u, 4281428110'u, 4281362830'u, 4281363086'u, 4281297806'u, 4281298062'u, 4281232782'u, 4281233038'u, 4281233294'u, 4281168014'u, 4281168270'u, 4281102734'u, 4281102990'u, 4281103246'u, 4281037966'u, 4281038222'u, 4280972942'u, 4280973198'u, 4280973454'u, 4280908174'u, 4280908430'u, 4280908686'u, 4280843406'u, 4280843662'u, 4280778382'u, 4280778638'u, 4280778894'u, 4280713614'u, 4280713870'u, 4280713870'u, 4280648590'u, 4280648846'u, 4280649102'u, 4280583822'u, 4280584078'u, 4280518798'u, 4280519054'u, 4280519309'u, 4280454029'u, 4280454285'u, 4280454541'u, 4280389261'u, 4280389517'u, 4280389773'u, 4280390028'u, 4280324748'u, 4280324748'u, 4280325004'u, 4280259724'u, 4280259979'u, 4280260235'u, 4280260491'u, 4280260747'u, 4280261002'u, 4280261258'u, 4280195978'u, 4280196233'u, 4280196489'u, 4280262281'u, 4280262536'u, 4280262792'u, 4280263048'u, 4280263047'u, 4280263303'u, 4280329094'u, 4280329350'u, 4280395141'u, 4280395397'u, 4280461189'u, 4280461444'u, 4280527235'u, 4280593027'u, 4280658818'u, 4280659074'u, 4280724865'u, 4280790401'u, 4280856192'u, 4280921983'u, 4280987775'u, 4281119102'u, 4281184893'u, 4281250684'u, 4281316476'u, 4281447803'u, 4281513594'u, 4281644665'u, 4281710457'u, 4281841784'u, 4281907575'u, 4282038902'u, 4282104693'u, 4282236020'u, 4282367091'u, 4282432882'u, 4282564209'u, 4282695536'u, 4282826863'u, 4282958190'u, 4283089261'u, 4283220588'u, 4283351915'u, 4283483242'u, 4283614569'u, 4283745640'u, 4283876967'u, 4284008293'u, 4284139620'u, 4284270691'u, 4284402018'u, 4284533344'u, 4284730207'u, 4284861278'u, 4284992604'u, 4285123931'u, 4285320538'u, 4285451864'u, 4285583191'u, 4285780054'u, 4285911124'u, 4286042451'u, 4286239057'u, 4286370384'u, 4286567246'u, 4286698317'u, 4286895179'u, 4287026505'u, 4287223112'u, 4287354438'u, 4287551045'u, 4287682371'u, 4287878977'u, 4288010304'u, 4288206910'u, 4288403772'u, 4288534843'u, 4288731705'u, 4288862775'u, 4289059638'u, 4289256244'u, 4289387570'u, 4289584176'u, 4289781039'u, 4289912109'u, 4290108971'u, 4290305577'u, 4290436648'u, 4290633510'u, 4290830117'u, 4290961187'u, 4291158049'u, 4291354656'u, 4291485983'u, 4291682589'u, 4291879196'u, 4292010523'u, 4292207130'u, 4292403737'u, 4292535065'u, 4292731672'u, 4292862744'u, 4293059608'u, 4293256217'u, 4293387289'u, 4293584154'u, 4293715227'u, 4293911836'u, 4294042909'u, 4294239774'u, 4294370848'u, 4294501921'u, 4294698787'u, 4294829861'u])
- Source Edit
DefaultSizeRange = (low: 2.0, high: 7.0)
- Source Edit
Procs
proc applyStyle[T: string | FormulaNode](style: var GgStyle; df: DataFrame; scales: seq[Scale]; keys: seq[(T, Value)])
- Source Edit
proc changeStyle(s: GgStyle; scVal: ScaleValue): GgStyle {....raises: [Exception], tags: [].}
- returns a modified style with the appropriate field replaced Source Edit
func mergeUserStyle(s: GgStyle; fg: FilledGeom): Style {....raises: [], tags: [].}
- merges the given Style with the desired userStyle. Source Edit
proc useOrDefault(c: ColorScale): ColorScale {....raises: [], tags: [].}
-
Either uses the given ColorScale (if it defines any colors) or falls back to our default
This exists to make sure that a FilledGeom receives a colorScale field with certainty. Otherwise we can end up in the situation that the user makes use of a function like scale_fill_continuous() (which doesn't set a color scale) and we suddenly don't have one.
We could make sure to assign a color scale for every procedure returning a color related Scale, but given that we don't have an Option[T] field, it's more sane to handle it like this (in case new procs are added for example).
Source Edit