Skip to content

Latest commit

 

History

History
876 lines (844 loc) · 40.6 KB

changelog.org

File metadata and controls

876 lines (844 loc) · 40.6 KB

v0.7.2

  • fix scale_x/y_log2/10 when using it on scales that ‘appear’ to be discrete based on their data. It was missing the boolean to indicate that a fixed discreteness is set

v0.7.1

  • update datamancer dependency for the fix of arrange in SciNim/Datamancer#68 for issue #180
  • make sure to set black font as default for TOML theme customization
  • make ggplotnim compile with --styleCheck:error (PR #182 by @c-blake)
  • add a {.booldefine.} variable to quiet ggplotnim when converting integers to floats, const ggPlotDebugTypeInfer {.booldefine.} = false. Compile with -d:ggPlotDebugTypeInfer=true to enable the info messages (old behavior) (PR #179 by @c-blake)

v0.7.0

This release is a rather big one. The majority of features added relates to customization of plots. Theme related improvements:

  • baseLabelMargin field to adjust the default range between tick labels and labels in cm.
  • allow adjustment of plot size via Theme
  • adjustment of annotation font via Theme
  • scale grid lines via Theme
  • add themeLatex, a very useful helper when producing PDF plots via TikZ where the actual target is a TeX file. Its argument fWidth combined with width (in pixel), textWidth (in pt of the actual \textwidth of the LaTeX document to be inserted) it allows to exactly specify font sizes of plots such that they match a given size in the resulting PDF. E.g. a plot to be inserted at 0.9\textwidth using fWidth = 0.9, a plot size of e.g. width = 600 pixel (for the standalone plot) and a textWidth of 450 pt (LaTeX pt) produces a resulting PDF after inserting the plot at the 0.9\textwidth that matches exactly the font sizes given by ggplotnim. The baseTheme is an argument of a procedure that returns the desired Theme to be used as a base.
    • singlePlot and sideBySide are two baseTheme procedures that produce nice looking graphs when inserting as a single or 2 side-by-side setup in a TeX file.
  • add coord_fixed option that creates the actual data portion of the plot in fixed ratio. E.g. an argument of 1.0 creates a plot of user given width where the height is computed precisely such that the data portion is of ratio 1:1. Useful for physical coordinates in a plot to correspond to the desired ratio.
  • allow setting useTeX argument via Theme (to enable/disable TikZ backend)
  • allow hiding x or y labels individually
  • adjust styling of ridgeline plots
  • add cool colormap
  • fields discrete/continuousLegendWidth/Height fields to Theme to adjust the size of continuous / discrete legends
  • add helper to add two Themes via +
  • respect user set margins in facet plots
  • add tomlTheme to set a theme at runtime from a TOML file. Example given in PR description (PR #176)
  • draw histograms as lines in discrete legends
  • add hideTitle to disable title (among other hide procedures)
  • add dataAsBitmap feature for Cairo, TikZ backend. In a vector graphic target will draw all the actual data as a PNG, similar to in a raster plot. This makes plots with large amounts of data as a vector graphic feasible.
  • make aes arguments to initial ggplot call optional. This of course implies arguments to geom_* calls are mandatory. There is a chance this is a breaking change in some contexts and decreases CT safety to some extent. But it can be very useful when combining different geoms that don’t share column names as well as using different aesthetics.
  • add experimental (CT + RT) option WritePlotCsv. If compiled with -d:WritePlotCsv and then a WRITE_PLOT_CSV=true environment variable set, ggplotnim will write CSV files for every plot produced. The filename is the filename of the plot with .csv suffix. For each geom that has a separate dataframe an extra CSV file is produced. This allows for easy sharing of data that is used to produce a plot.
  • add TEXT_PRECISION environment variable check for geom_text to adjust the precision used for floating point numbers.
  • allow assignment of facets in user given order by order argument to facet_wrap
  • add option gradient opposite to factor to force an aesthetic argument to be continuous
  • adjust data scale in scale_fill/color_continuous/gradient procs
  • allow annotations to be placed at top/right positions in addition to left/bottom
  • fixes to raster plots with other geoms resulting in bad data ranges
  • better support for histograms with minimal values != 0
  • use expandTilde in ggsave
  • improve logic detecting discreteness of arguments
  • better exception message when color parsing fails
  • refactoring of facet logic
  • fixes to legend heights in some setups
  • better date logic for non facet plots

v0.6.3

  • allow adjustment of title position in relative coordinates using titlePosition
  • allow adjustment of tick style using tickLength, tickWidth, tickColor and tickKind
    • adds tickLength argument to x/ylab
  • allow adjustment of legend title font and legend tick label font using legendFont
  • allow adjustment of font and placement of text in facet header using facetHeaderText
  • add experimental theme_scale to scale up/down all fonts / tick sizes etc. by a factor. Useful to effectively change the DPI of the figure.
  • add experimental theme_font_scale which acts like theme_scale, but does not adjust the base scale (related to scaling the margins)
  • allow to assign custom order in facet_wrap based on a order: seq[Value] argument
  • add new feature helping with reproducibility of plots: If compiled with -d:WritePlotCsv ggplotnim now provides the option to automatically write out CSV files for input DF for each plot that is created (if enabled via environment variable WRITE_PLOT_CSV=true). Also all DFs associated with individual geoms will be written with a geom specific suffix.
  • fix geom_raster when used in conjunction with another geom that has a larger data range
  • allow adjustment of margin used by default between the tick labels and the labels. Default is 0.3 cm, can be changed using baseLabelMargin proc / Theme field
  • improve logic for histograms in the case where the minimum viewport is not 0, which can happen for custom ylim calls (for example for manual log10 histograms via stat = "identity")

v0.6.2

  • handle geom calls with constant values better. Previously we sometimes ended up drawing the same e.g. text multiple times, once for each input DF row. We now deduplicate for cases where x and y are constant.

v0.6.1

  • do not change the top margin of a plot based on a legend being added anymore. That’s kind of jarring.
  • add scale_fill_log10 for log10 raster scales
  • x/ylim now ignore input range values if the values are the same. This is to support code that takes the ranges from a variable to support the case of a default e.g. (0, 0) argument

v0.6.0

  • make SDL2 backend a full submodule that can be imported using import ggplotnim/ggplot_sdl2
  • -d:experimentalSDL2 is still supported and imports/exports the module for you
  • allow to also save a plot at the same time as showing it, by handing a filename argument to ggshow
  • update ginger dependency to v0.5.0. This fixes our previously still not quite correct placement of text which relied on string width/height information. Now it is also correct on the TikZ backend

v0.5.13

  • do not crash SDL2 viewer when resizing the window too much
  • implement panning (left mouse button), mouse wheel zooming. Zooming to a rectangle moved to the right mouse button
  • allow resizing of the SDL2 window

v0.5.12

  • create the plot using the sizes given to ggshow
  • handle resizes of the SDL2 window

v0.5.11

This adds a very experimental and basic SDL2 interactive backend.

Simply compile your program with `-d:experimentalSDL2`. It makes `ggshow` available (which takes the size of the SDL2 window as optional arguments).

It creates an SDL2 window of the plot (and pauses the main thread). The only interactivity supported at the moment is zooming using the mouse. Click and hold on a rectangle zooms to that rectangle and a single click reverts the zoom.

Note: we do not catch exceptions due to invalid data ranges etc at the moment. Experiment at your own risk. :)

v0.5.10

  • add support for geom_density via arraymancer’s KDE implementation
  • add timeZone option to scale_*_date This adds a TimeZone field to the date scales and uses it to set the labels for them. Further, it fixes a few small issues with the date algorithms and how they assign the formatting to the correct dates.
  • make legend markers reflect usage of markers beyond geom_point. Also supports lines and tiles now.
  • fixes an issue with facet plots containing a discrete scale causing a runtime error trying to compute margin ranges
  • add alignKind to Annotation, allowing the text to be aligned accordingly
  • allow alpha channel in geom_raster
  • allow nnkPrefix in aes macro
  • update ginger dependence to v0.4.3

v0.5.9

  • update seqmath dependency to v0.1.16, ref issue #163

v0.5.8

  • support weights in geom_bar, previously it was ignored

v0.5.7

  • give all GeomKind fields a name representing the geom_* procedure used to create them (lossy though, not all geom_* procedures have GeomKinds
  • throw exception if no y scale given when needed and when given if not needed
  • fix issue with Vega backend where we tried to look up internal scale

v0.5.6

  • fixes discrete stacked plots on the Vega-Lite backend
  • avoids showing the internal naming scheme of DF columns in Vega-Lite plots & makes sure any user defined axis label via xlab / ylab are used

v0.5.5

  • minor improvements to the Vega-Lite backend:
    • adds a docstring to ggvega
    • cleans up the write file implementation to be more safe & useful
    • allows to not show a plot even if an HTML file is generated
    • allows to specify pretty JSON output even for HTML files
    • raises an exception if neither HTML or JSON is desired
    • allows to change the backend to using a browser.
    • adds a toVegaHtml which can either generate only the Vega body or vega in a full HTML. In the former case it can be embedded later using embedVegaBody.
    • further adds options to change the version & CDN settings.

v0.5.4

  • make ggplotnim work with strictEffects, PR #151

v0.5.3

  • update to Datamancer v0.3.0, which adds experimental support for “generic” types. This only makes ggplotnim compatible with it, but does not allow generic types in ggplotnim yet!
  • cleans up SecondaryAxis logic as a side effect by introducing PossibleSecondaryAxis
  • add missing scale_y_discrete that takes explicit labels

v0.5.2

  • allows to customize the margin between tick labels and their ticks via the tickMargin argument to x/ylab
  • further fixes for missing color scales when using scale_fill/color_continuous
  • fixes an issue with reference semantics messing up plots in certain cases when user given formulas modified the input DF in a certain way between different geoms
  • add backend argument to ggsave to allow choice of backend, e.g. to use pixie backend
  • replace usages of seqsToDf by toDf
  • let backgroundColor, canvasColor, gridLineColor take a PossibleColor to support string based colors
  • add onlyAxes argument to gridLines & Theme object to allow to only draw axes instead of the full grid (needs ginger v0.3.13)

v0.5.1

(as is usual, a hotfix is always coming quickly....)

  • fixes a regression for continuous color scales, where if scale_color/fill_continuous was used, we ended up without a color scale in drawCb
  • makes sure the indexing of the color scale for raster plots actually uses the number of available colors instead of 256 values

v0.5.0

  • add support for custom (and customized) colormaps
  • add additional inferno, magma, plasma colormap
  • add two recipes about colormaps:
    • rColormaps.nim: a comparison about the available colormaps
    • rCustomColormap.nim: a recipe showing how to modify an existing colormap / provide a custom one
  • add scale_fill/color_gradient function to assign such color maps to a plot
  • allow to customize layout in ggmulti plot (subplots of fully separate plots):
    • allow so set custom widths and heights for the rows / columns
    • allow to prefer columns over rows and vice versa for the layouting (by adding a prefer_columns() or prefer_rows() call to the plotting chain)
  • ggplot call now allows widths and heights not only as float value, but any number
  • add alpha as a valid Scale (allows setting & mapping alpha)
  • add the following scale functions:
    • scale_size/alpha_discrete/continuous: force given size / alpha scales to be discrete / continuous
    • scale_color/fill/size/alpha_identity: force the given corresponding aes scale to be treated as containing values to set the scale, i.e.:
      import ggplotnim
      
      let df = toDf({ "x" : @[1, 2, 3, 4], "y" : @[1, 2, 3, 4],
                      "colors" : @["red", "green", "blue", "#FF00FF"]})
      ggplot(df, aes("x", "y")) +
        geom_point(aes = aes(color = "colors"), size = 12.3) +
        scale_color_identity() +
        ggsave("/tmp/colors_manual.pdf")
              

      i.e.: aes the color scale, then say that given color is actually a scale to set values based on the column directly, instead of performing automatic mapping based on the number of distinct labels.

  • major change in how geom_* procedures deal with setting scales: see the description of PR #143 for what this implies. Short version: one can now hand arguments for e.g. size, alpha, color, … as non Option[T] values (e.g. see the size argument in the code snippet above). Also explicit string/int values are now supported for colors.
  • add -d:nolapack compilation option to remove LAPACK dependency. This disables support for geom_smooth

v0.4.11

  • add option to draw minor grid lines (thinner lines between major ones that have a tick & tick label associated)
  • add customization options for grid lines, enable / disable, width and color of (minor) gridlines
  • add scale_fill_discrete to force a fill scale to be discrete
  • replace numX/YTicks logic from ggplot procedure by better handling as a field of a Scale object
  • add breaks arguments to multiple scale_x/y_* procedures to specify either the number of desired ticks along the axis or specific tick locations. Supports any continuous scale and date scales.
  • update dependency of datamancer to v0.1.11 due to CSV change relevant for periodic table recipe.

v0.4.10

  • update ginger dependency to v0.3.10
  • improve text placement of x labels (in particular of relevance for TikZ)
  • the ggplot procedure now takes an optional backend argument for use cases when not using ggsave (e.g. for testing or when creating multiple plots in a single viewport). Due to making ginger less backend dependent
  • adds a generateAll nimble task to generate all data required for tests & CI

v0.4.9

  • add support for more shapes when using geom_point (9 shapes in total now)

v0.4.8

  • add ggvega_tex, a saving helper that generates the same plot both as a TikZ LaTeX native file (as a .tex) as well as a Vega-Lite plot in form of a .json file
  • add a LaTeX theme (mainly different font sizes than default).
  • fix performance regression when plotting stacked histogram (default, also applies to non mapped histograms) in particular for large input DFs

v0.4.7

  • fix geom_smooth internal handling when filling smoothed FilledGeom objects to raise if input data is considered discrete. This is incompatible with smoothing statistics.
  • improved the info messages for automatic determination of discreteness of the input data based on @haxscramper’s input.

v0.4.6

  • add backgroundColor to change the color of the plotting area manually
  • add gridLineColor to change the color of the grid lines manually

v0.4.5

  • adds support for generation of native LaTeX plots using ginger's TikZ backend
  • adds a recipe showcasing the TikZ backend: rTikZLandau.nim

v0.4.4

  • combining stat = "count" with a continuous classification now yields a runtime exception, explaining that it’s not well defined.
  • allow to rotate annotations. Note: if combined with a non transparent background, the background and text are not correctly aligned at the moment (rotation happens around different points for each object).
  • add scale_x/y_date to create ticks and labels according to sensible date time values.
  • add geom_smooth to smooth noisy data. Two smoothers are currently implemented:
    • Savitzky-Golay filter (often also called “LOESS” or local regression)
    • polynomial fit.

    With Levenberg-Marquardt fits to be implemented soon (possibly via a C dependency on mpfit in the beginning though)

  • add geom_smooth recipe rGeomSmooth.nim
  • add geom_smooth recipe rLinearFit.nim showcasing how to use polynomial smoothing of order 1 for linear fits to the data.
  • add recipe showing how to create date time based custom ticks and labels rScaleXDate.nim.

v0.4.3

  • add ggmulti helper that takes multiple ggplot calls and puts them onto a grid of plots (not as a facet etc. but simply multiple, unrelated plots)
  • remove datamancer leftover (hashes of FormulaNode)
  • fixes error bar issue #94 by upstream fix in ginger
  • fixes error bar plots drawing to 0 value if min / max missing, fixes #122
  • avoids drawing multiple constant lines in geom_linerange by filtering to unique row pairs, fixes #124

v0.4.2

  • make shallow copies of all input data frames

v0.4.1

  • fix issue #99 by doing a rewrite of the stacking logic. Handled in post processing stage now and data is stored in DF (same as for counts)
  • fix issue that last bin edge showed up as points etc. if using points together with a histogram
  • fix drawing of frequency polygon lines, now take into account bin width to close of the final lines on each site
  • hdOutline histograms can now be drawn correctly as stacked histograms (but if using alpha they are still visible behind the other bars!)

v0.4.0

  • removal of the internal dataframe. This has been made a standalone package: Datamancer
  • runtime errors regarding empty columns, determination of discreteness and DF columns with object like data have been improved significantly. Added info messages for auto determination of types.
  • floating point columns are now always treated as continuous columns by default (which is a breaking change). To overwrite use scale_x/y/..._discrete or simply factor(col) in aes. Fixes issue #91.
  • changes the default background color from transparent to white (ref #117). Thanks @pietroppeter for the feedback!

v0.3.26

  • major rewrite of the formula macro. Behavior is essentially the same, but more robust, generalizes better and fully working index / column specification and much better automatic type deduction.
  • filter can now take a scalar (reducing) formula returning a bool. Useful in combination with a group_by call
  • fixed stacking of histograms in case of hdOutline (“lowest” element was ignored)
  • readCsvTyped is now the default CSV parser

v0.3.25

  • fix issue #110; facets now support multiple geoms in one facet plot
  • add classifying using shapes (marker kind & line shape). However, only 2 marker kinds are implemented at this point. Multiple line shapes exist at least.
  • build foundation to support arbitrarily scaled secondary axes. This feature is not working for most transformations yet, due to the implementation of how transformed ticks are computed.

v0.3.24

  • better handling of ticks
  • secondary axes can now be a transformed version of the primary axes
  • unique has a keepAll option, which keeps all column in the resulting DF and not only those for which the unique check is performed
  • fix bug in readCsvTyped for CSV files without an empty line at the end
  • allow nnkBracketExpr, nnkCurly in formulas
  • fix issue in gather when gathering a DF with multiple column types. Type of the gathered columns took all DF columns into account, even those not gathered.
  • readCsvTyped now handles rows with more , than in the header. In that case all columns after the number of columns from the header have been parsed are simply skipped.
  • add fillColor to geom_histogram. Previously the color argument was used to set both the color (outline) as well as fill color of the drawn histogram. Now those are separate. This is a breaking change though! Makes it easy to set e.g. the outline to transparent by assigning a transparent color to color, but still have a filled body.
  • change default tick label margin to be based on font height (by default 1.25 / 1.75 for y / x labels)
  • fix drawing first bin when histogram using outlines
  • numX/Y are now ignored for geom_raster and are computed internally
  • raise an exception if no fill scale present for geom_raster
  • support column to string tensor conversion

v0.3.23

This version was accidentally skipped, oops.

v0.3.22

  • to use ggvega import gglotnim/ggplot_vega (not imported by default anymore)
  • add a simple Vega-Lite recipe: rSimpleVegaLite.nim (this recipe is not part of the CI yet)

v0.3.21

  • show tick labels for log plots if no full power of 10 visible
  • facet_wrap fixes:
    • apply tick rotations to tick labels
    • use numXTicks for x ticks of the GgPlot object instead of a default of 10 ticks
    • fix bug affecting range computation in facet wraps if the scales are set to free and an additional global classification was applied
    • apply reversal of scales in facet wrap
  • allow changing the number of desired ticks in ggplot call (differs from ggplot2 where this is done using scale_* functions)
  • apply reversal of x/y scales to discrete axes correctly
  • do not ignore number of ticks for log10 scales
  • fix issues with aes macro for certain ways to call it
  • add hideLegend proc to hide legends even if otherwise drawn
  • add color argument to theme_void to be able to set different background color on empty themes (joyplots anyone?)
  • adds asserts to DataFrame access (not doAssert though, still be careful in danger builds!)
  • initialize DataFrame if trying to assign a column to an uninitialized DF
  • add missing alpha option for geom_point
  • misc. fixes for ARC support:
  • avoid deepCopy when cloning a DataFrame (leads to segfaults with laser based arraymancer tensors, which are ptr + len pairs)
  • allow column.add for first argument uninitialized
  • massively improve raster performance by bypassing almost all slow code branches for dataframes / large number of different styles
    • currently breaks position argument for raster plots!
  • export asgn proc, which bypasses the length check of the DF one assignes a column to. Can be handy to have outside of the main code base for optimization purposes.
  • add []= taking a filtering FormulaNode and key and assigning a constant value to each matching row, e.g. df[f{`colA` > x and `colB` < y, "colC"] = z
  • add add proc taking a tuple to add a single row to a DF. Warning, this reallocates every tensor in the DF with length + 1. Only use this for very few adds.
  • misc style fixes
  • adds new drawing option for histogram, by drawing histograms as outlines:

    Adds the option to draw histograms either as individual bars, which sit right next to each other (hdBars) or as a line showing the outline (hdOutline).

    The latter is useful if one wants to avoid aliasing / moiré like effects of individual bars (some white visible between touching bars).

    Also if one wishes to draw histograms using some alpha (or without any fill at all) not seeing the individual bars might be desirable.

    The default remains drawing individual bars for now.

  • histogram: line width of the outline is now customizable
  • add scale_*_log2
  • make transformed data more general by adding inverse transformation, which allows for arbitrary user definable data transformations
  • add scale_color_continuous to control value range of continuous color (scColor instead of scFillColor)
  • add map, map_inline for Column for simple convenience. map_inline tries to “determine” the type of the operation automatically, but this means we compile a runtime exception for branches of map_inline that are not supported, e.g. a c.map_inline(a + b) will raise if c is actually a string column
  • add showVega webview viewer: ggvega now works in the following way:
    • no argument given: open the file as webview with the HTML stored in the tmp directory as `vega_lite_plot.html`
    • filename given:
      • if filename ends with `json`: store json in given filename, do not

      open a vega view

      • if filename does not end with `json`: store HTML in given filename

      and open webview

  • add facetMargin proc to control the used margin in a facet plot
  • make mutate/transmute work on grouped dataframes by acting on each group with each formula instead of the whole DF
  • miscellaneous code reorderings and refactoring
  • runRecipes.nim is partially deprecated. Instead of compiling and running each recipe individually, we now have allRecipes.nim, which simply imports all recipe files and thus replaces N compilations by 1.
  • replace Travis CI by Github Actions
    • we now run CI on Linux, OSX and Windows. Note that OSX and Windows result in slightly different plots due to differences in fonts. Thus, some tests are not as stringent (or disabled) on these platforms
  • docs are now autogenerated
  • added new recipes:
    • rHistogramOutline: showases drawing histograms as outlines
    • rRidgeLineGauss: a simple example of a ridgeline plot as well as showcasing that formulas can be applied to each labels of a classified geom
    • rRidgeLineGaussBlack: the same plot in “prettier”
    • rJoyplot: the same plot again, this time as a full “Joyplot”
  • evaluate can now evaluate a formula of kind fkScalar. This is useful to get a Column with a single element from a reduce operation and comes into play when using a reduce operation for an aesthetic, e.g. x = f{mean(`someCol`)}

v0.3.20

  • fix a bug that causes the arrange proc to mess up sorting if more than one key is used. The last row of the DF was not sorted before and thus remained in unsorted order at the end of the sorted result.
  • geom_errorbar now takes an errorBarKind field to set the kind of errorbar to draw
    • ebLinesT, ebLines are the only two options atm
  • add scale_fill_continuous to force the fill scale to be interpreted as continuous values
  • ggsave will now create the directories contained in the path given to it instead of silently not creating a plot if the path to the given file does not exist yet.
  • attempt to get rid of duplicate legends in case of certain ggplot calls
  • fix bug causing accessing labs sequence for log10 tick values, in case the tick labels were hidden (e.g. log10 facet_wrap).
  • add experimental legendOrder proc to reorder the elements in a legend by a permutation of the “correct” order. Not the most user friendly and untested.
  • add automatic wrapping of long lines in the title of a plot
  • support manual wrapping in the title of a plot

v0.3.19

  • allow nnkCommand nodes for aes macro

v0.3.18

  • allow setting custom margin of the plot using margin
  • add recipe for custom margins: rCustomMargins.nim

v0.3.17

  • add scale_fill/color/size_manual to provide custom colors / sizes for such mappings
  • add a recipe showing custom fillings, rCustomFill.nim

v0.3.16

  • add drop_null to drop VNull values from a single or multiple columns in a data frame
  • add toNativeColumn, which attempts to convert an object column to a native column

v0.3.15

  • add geom raster for efficient drawing of evenly spaced tile maps (e.g. many pixel heatmaps)
  • make code ready for --gc:arc by removing deepCopy calls
  • allow real constant columns in data frame (only store a single value), which behave like real columns
  • slight code clean up
  • data frame meta information now returned by pretty instead of being echoed
  • data frame now uses OrderedTable to properly keep order of keys
  • fix setting custom limits on facet wrapped plots
  • add 3 new recipes:
    • rPointInPolygons.nim: a random recipe that came up as an idea during a discussion. Calculates whether points are in a polygon and draws them with a color depending on that
    • rSimpleRaster.nim: a simple example of a 256x256 pixel raster
    • rFacetRaster.nim: an example of plotting two 256x256 pixel rasters in a facet

v0.3.14

  • hotfix release to unbreak Nim CI -> fixes a regression due to an additional field in ginger, for which by default no % is provided in json.nim

v0.3.13

  • make aes a macro
    • allows for named / unnamed arguments
    • raw identifiers will be interpreted as strings, if not symbol is declared with the identifiers name
    • factor can be applied to an argument to force this scale to be discrete. For every scale that is not x/y this wasn’t possible (for x/y via scale_x/y_discrete)
  • provide better error messages for some mixtures of geoms + continuous scales

v0.3.12

  • GgPlot is not a generic anylonger. Originally the idea was to provide support for multiple data types, but nowadays the code base is too intertwined with the DataFrame that this doesn’t make sense anylonger and in fact produces problems (e.g. “undeclared identifier” when combining implicit generic + template)
  • fix for Nim devel regarding change of named / not named tuples
  • avoid usage of random which is now removed on devel

v0.3.11

Hotfix for Nim devel by @timotheecour. Fixes issues regarding lent iterators.

v0.3.10

  • fix bug in add for data frames if first argument was still nil
  • allow multiple types in innerJoin, requirement is that columns to be combined are compatible (mainly means int + float -> float)
  • add some tests for innerJoin

v0.3.9

  • add support for weighted bin count statistics (weight field for e.g. geom_histogram)
  • add suport for density computation when using bin count statistics (density argument to geom_* procedures)
  • add two recipes:
    • rWeightedHistogram.nim: histogram of carat of diamonds weighted by price
    • rHistogramDensity.nim: histogram of carat of diamonds as a density instead of counts

v0.3.8

Hotfix for broken CI, due to one recipe rFormatDatesPlot.nim being dependent on time recipe is being run.

v0.3.7

  • tick labels can now be provided to scale_x/y_discrete/continuous via a callback, PR #70 by @cooldome
  • adds two recipes:
    • rFormatDecimalsPlot: example to provide custom formatting for decimals in tick labels
    • rFormatDatesPlot: example to provide custom formatting for dates as tick labels

v0.3.6

  • hot fix for nimIdentNormalize usage in 1.2.x by accident (only available from 1.3.x)

v0.3.5

  • facet_wrap is finally back! Now finally allows to fix / not fix the scale of each subplot and wrap by multiple columns.
  • fix pretty printing of VObject Value
  • add toObject overload for Value taking (string, Value)
  • add contains for Value in Value, which checks whether one VObject contained in another
  • yieldData of FilledGeom is now keyed only by the label (VObject Value) comprising the discrete values of N columns for the given object, instead of baseStyle + label. This allows to access a specific style / data frame for a given label (ridgeline plots + facet need this).
  • handleTicks now still creates ticks and labels if hideTickLabels is true, but doesn’t assign them to the viewport. This way they can still be accessed to e.g. draw grid lines.
  • handleTicks now handles custom margins
  • facet_wrap now also takes raw strings and a scales argument, which is used to fix the scales of all plots in a facet_wrap to the same scale or leave them free.
  • Theme now has x/yTickLabelMargin fields to customize margin for x and y tick labels (currently not exposed, used internally for facet plots, create Theme manually and set them if required).
  • add BinByKind / binBy field for statKind="bin" to allow binning to happen only on the current subset of data that is actually considered. Useful if the data is in multiple different ranges and binning should happen according to those ranges.
  • the count column after a histogram call is now not always an object column. The last value contains the right most bin edge, the count column is now filled with a 0.
  • gather can now again gather columns of different data types again (int + float is merged to float, other combinations to object colunms)
  • fn {} formula syntax can now deal with nnkTableConstr (effectively allows type hints)
  • now only a single list of recipes to test / run in recipes/recipeFiles.nim, which is used in comparison test and runRecipes.nim
  • ggjson helper with same signature as ggsave to allow dumping final plot viewport to JSON file (used for CI)
  • all recipes are now compared as JSON files!
  • add two more recipes:
    • rSimpleFacet.nim: simple facetting example using mpg dataset
    • rFacetTpa.nim: facetting example using TimepixAnalysis data

v0.3.4

  • allow creation of colunms from other int and float types (other than int64 and float64) via toColumn
  • allow access of DF columns with mutability ([]= returns var Column)

v0.3.3

  • allow negative values in geom_bar and geom_histogram if identity statistics is used
    • add recipe rNegativeBarPlot.nim to showcase this

v0.3.2

  • updates ginger dependency, due to a ginger bug which under some circumstances could cause bugged drawings (e.g. for error bars with “T” like shape)

v0.3.1

  • fixes #61, by forcing the minimum y value to be 0 for geom_bar if identity statistics is being used.

v0.3.0

  • aes now not only accespts strings, but also numbers, which will also be wrapped in a FormulaNode of kind fkVariable. No need to manually create such a formula.
  • add new recipes:
    • rAutoColoredNeuralSpikes.nim: example on how to create neural raster spike plot
    • rCustomColoredNeuralSpikes.nim: same
  • add scale_x/y_reverse to reverse the x or y scales. Done by adding FilledScales fields reversedX/Y, which are set in collectScales. If any scale is reversed, the plot will be reversed.

v0.2.21

  • summarize now works reliably on data frames, which have been grouped by multiple columns
  • fixes a few bugs regarding wrong length scales used
  • fixed a possible assertion error, due to unsafe access of an `Option[T]` (wrong field checked in if)
  • introduce StyleLabel to retain information about styles for discrete labels in FilledGeom.yieldData. Allows to know which style belongs to which label of a discrete scale.
  • fix assignBinFields to actually use given argument instead of result from caling scope
  • add theme fields to hide labels, ticks and tick labels
  • add theme_void, an empty theme. No labels, ticks, tickLabels, grid lines, white background.
  • use pretty(Value ...) for children of VObject
  • do not collect text scales anymore. They’re not used in the post processing stage. Only care about column (note: this may change, if we want to incorporate the string widths / heights into the plot scales!)
  • do not crash if no label is present in handleLabels yet
  • add ScaleKind for text: scText to not confuse text with x or y axes
  • plot layout now differs for themes without labels and ticks. Only 0.2 cm on LHS of plot instead of 2.5 cm
  • handleDiscreteTicks now takes only labels instead of a full Scale
  • handleTicks respects hideLabels and allows custom number of ticks (to call it from elsewhere, e.g. gradients)
  • handleTicks can take a custom boundScale. Allows to call it for other uses.
  • only yield scales that show up as legends by enumerateScalesByIds iterator
  • addIdentityData during collection now preallocates space for data
  • add ridgeline plots; accessed by applying ggridges to a plot. Ridges are not really a geom, but rather a specific feature similar to facets. Essentially an aesthetic yRidges is added, by which is classified. Each labels gets its own ridge. In that ridge every normal kind of plot is allowed (including more classical ridgeline plots)
  • progress towards supporting –gc:arc. No more deepCopy in use.
  • add (not working yet) scale_*_reverse to reverse x and y scales. In principle it does work, but how to hand information to where its needed unclear (add to FilledScales, GgPlot, … ?)
  • add more recipes:
    • rAnnotatedHeatmap.nim: example of a heatmap overlaid with text
    • rMultiSubplots.nim: an example on how to use ginger to combine two plots to one subplot
    • rPeriodicTable.nim: creating a periodic table as a plot!

v0.2.20

  • move font helper to ggplot_utils
  • remove spacing between multiple legends. Previously there was 1 cm of space if multiple legends were shown. That took too much space and wasn’t required imo.
  • fix classification by multiple discrete scales
  • fix issue for discrete scales, which caused index error in getView, when a position was moved via binPosition
  • add width, height to scales, which are collected. This was simply missing.
  • add geom_text
  • add font field to GgStyle object
  • update rMultipleLegends due to spacing between two legends
  • add recipes:
    • rSimpleGeomText.nim
    • rClassifiedGeomText.nim
    • rAnnotateUsingGeomText.nim
    • rAnnotateMaxValues.nim
  • update ginger dependency to v0.1.17

v0.2.19

Hotfix release for small regressions introduced in v0.2.18

  • fixes the layout of plots discrete axes. Due to recent ginger changes the position of the ticks and tick labels was wrong.
  • fixes the placement of geom_tile for discrete cases.
  • updates all plots with discrete axes

v0.2.18

  • finally fixes multiple legends. Now automatically evenly spaced and centered
  • distances of legends / labels to legend are now fixed in absolute units (thanks to fix in ginger v0.1.15)
  • fix distance of tick labels to ticks, now also in fixed absolute distances (that’s why every plot is updated)
  • add geom_tile
  • update all plots due to ginger fixes / placement of tick labels

v0.2.17

  • most geoms now take an alpha argument to override the alpha of fillColor
  • if a fill color of a line is set, the line is now continued down to the x axis

v0.2.16

  • geom_point with positoin = "stack" now draw points at y = 0
  • geom_histogram/bar now draw “empty” elements for position = "stack" (set lineWidth to 0 to make them disappear)
  • y axes may now be discrete (previously only the x axis could be discrete)
  • rewrites drawing code to have less duplication. For some kinds of plots this might (!) incur a tiny performance regression.
  • refactors out code related to

v0.2.15

  • IMPORTANT: there was a bug in seqmath.histogram, which is used in geom_histogram / if stat = "bin" is used. The bug caused wrong histogram calculations if and only if unequal bin widths were used. Equal bin widhts were fine. This was fixed in seqmath v0.1.7
  • add geom_errorbar for plots with error bars in x / y direction
  • add geom_linerange, which are either error bars without an orthogonal line at the end (not “T” shaped, “|” like) or just, well, line ranges.
  • slight performance increase for large datasets, due to avoiding running over data twice to determine min / max values.

v0.2.14

  • starts a changelog :)
  • formula.evaluate[T](node: FormulaNode, data: T): Value is now formula.reduce(node: FormulaNode, data: DataFrame): Value. Generic usage is just clutter. reduce makes the intent clearer and opens up the name for an evaluate that returns a full vector
  • adds formula.evaluate(node: FormulaNode, data: DataFrame): PersistentVector[Value].
  • The Scale.col field is now FormulaNode instead of string. This allows for calculations on the DF to use for scales instead of only columns.
  • aes() is now generic and takes a mix of string | FormulaNode to allow to apply formulas to the DF w/o intermediate calculations on the DF manually. E.g. aes(y = f{"yCol" * 2}) is now valid
  • improve performance for certain plots with many geoms
  • add inplace variants for select, mutate, transmute (*Inplace).