ggplotnim/ggplot_scales

    Dark Mode
Search:
Group by:
Source   Edit  

Procs

proc getColName(s: Scale): string {....raises: [Exception, ValueError],
                                    tags: [RootEffect].}
returns the name of the referred column of the given Scale s. Usually this is just the stringification of s.col, but for scTransformedData, we have to assign to a column, which includes the name of the transformation, so that we don't override the existing column. This is because otherwise we modify the DF (we call mutateInplace) and will apply the transformations multiple times if several geoms are plotted! Source   Edit  
proc getFillScale(filledScales`gensym56: FilledScales;
                  geom`gensym56 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getHeightScale(filledScales`gensym70: FilledScales;
                    geom`gensym70 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getLabelKey(s: Scale; at: int): Value {....raises: [], tags: [].}
returns the key at index at for the Scale s Source   Edit  
func getSecondaryAxis(filledScales: FilledScales; axKind: AxisKind): SecondaryAxis {.
    ...raises: [Exception, ValueError], tags: [].}
Assumes a secondary axis must exist! Source   Edit  
proc getTextScale(filledScales`gensym72: FilledScales;
                  geom`gensym72 = Geom(gid: 0)): Scale {....raises: [], tags: [].}
Source   Edit  
proc getValue(s: Scale; label: Value): ScaleValue {.
    ...raises: [KeyError, ValueError], tags: [].}
returns the ScaleValue of the given Scale s for label Source   Edit  
proc getWeightScale(filledScales`gensym76: FilledScales;
                    geom`gensym76 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getWidthScale(filledScales`gensym68: FilledScales;
                   geom`gensym68 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getXMaxScale(filledScales`gensym64: FilledScales;
                  geom`gensym64 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getXMinScale(filledScales`gensym60: FilledScales;
                  geom`gensym60 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getXScale(filledScales`gensym52: FilledScales; geom`gensym52 = Geom(gid: 0)): Scale {.
    ...raises: [], tags: [].}
Source   Edit  
proc getYMaxScale(filledScales`gensym66: FilledScales;
                  geom`gensym66 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getYMinScale(filledScales`gensym62: FilledScales;
                  geom`gensym62 = Geom(gid: 0)): Option[Scale] {....raises: [],
    tags: [].}
Source   Edit  
proc getYRidgesScale(filledScales`gensym74: FilledScales;
                     geom`gensym74 = Geom(gid: 0)): Scale {....raises: [], tags: [].}
Source   Edit  
proc getYScale(filledScales`gensym54: FilledScales; geom`gensym54 = Geom(gid: 0)): Scale {.
    ...raises: [], tags: [].}
Source   Edit  
func hasSecondary(filledScales: FilledScales; axKind: AxisKind): bool {.
    ...raises: [], tags: [].}
Source   Edit  
proc scaleFromData(c: Column; s: Scale; ignoreInf: static bool = true): ginger.Scale

Combination of colMin, colMax to avoid running over the data twice. For large DFs to plot this makes a big difference.

The input Scale is just for error messages.

Source   Edit  
func updateAesRidges(p: GgPlot): GgPlot {....raises: [], tags: [].}
Adds the ridges information to the GgPlot object by assigning the yRidges aesthetic to the global aesthetic and forcing its scale to be discrete. Source   Edit  

Iterators

iterator enumerateLabelPairs(s: Scale): (int, Value) {....raises: [], tags: [].}
Source   Edit  
iterator enumerateLabels(s: Scale): Value {....raises: [], tags: [].}
Source   Edit  
iterator enumerateScales(filledScales: FilledScales; geom: Geom): Scale {.
    ...raises: [Exception], tags: [RootEffect].}
Yields all scales, which are allowed for the given geom Source   Edit  
iterator enumerateScalesByIds(filledScales: FilledScales): Scale {....raises: [],
    tags: [].}
yields all scales from the FilledScales that are required for the default backends, which use ginger, i.e. not vega. All missing fields are accessed in a different manner. Source   Edit  
iterator enumerateScalesByIdsVega(filledScales: FilledScales): Scale {.
    ...raises: [], tags: [].}
yields all scales from the FilledScales for Vega. Source   Edit  
iterator enumerateScalesVega(filledScales: FilledScales; geom: Geom): Scale {.
    ...raises: [Exception], tags: [RootEffect].}
Yields all scales, which are allowed for the given geom Source   Edit  
iterator keys(s: Scale): Value {....raises: [], tags: [].}
NOTE: for clarity use enumerateLabels instead! Source   Edit  
iterator pairs(s: Scale): (Value, ScaleValue) {....raises: [], tags: [].}
Source   Edit  
iterator values(s: Scale): ScaleValue {....raises: [], tags: [].}
Source   Edit