dittoSeq icon indicating copy to clipboard operation
dittoSeq copied to clipboard

Use dittoViz

Open dtm2451 opened this issue 2 months ago • 0 comments

This update achieves a longstanding goal of replacing the bulk of dittoSeq innards with their dittoViz counterparts

Follows dittoViz branch 'dittoSeq-align', which has now been merged and become dittoViz-v1.0.5

Merge Timing: Now that dittoViz-v1.0.5 has been released through CRAN, I plan to merge this PR very soon!

Generally, dittoViz equivalents encompass ALL plotting functionalities of their dittoSeq counterpart. Thus, updates here allow dittoSeq functions to simplify down HEAVILY to just:

  1. Extract all needed data elements from the 'object' into a single dataframe
  2. Resolve any labeling defaults that dittoViz might resolve differently
  3. Pass to dittoViz

Update Details

Tests pass but careful before vs after comparison not yet complete so the summary below should be expected to change!

Initial Implementation Achieves:

  • Primarily replaces direct visualization code with dittoViz implementations:
    • dittoViz::barPlot() for dittoBarPlot()
    • dittoViz::freqPlot() for dittoFreqPlot()
    • dittoViz::yPlot() for dittoPlot() and dittoPlotVarsAcrossGroups()
    • dittoViz::scatterPlot() for dittoDimPlot() and dittoScatterPlot()
    • dittoViz::scatterHex() for dittoDimHex() and dittoScatterHex()
  • Includes features adds already available in dittoViz:
    • Expanded 'add.line' & 'add.(x|y|ab)line' capabilities
    • Optional swapping to number-based on-plot labeling with 'labels.use.numbers' wherever 'do.label' is available.
    • Added 'data.only' option for dittoBarPlot() and dittoFreqPlot()
    • Expanded default data plotting for 'do.hover' behavior with rounding of numbers past 'hover.round.digits' number of digits.

Also includes some feature changes: - loss of separated from 'var' adjustment control for dittoScatterPlot() and dittoScatterHex() 'extra.vars' - standardized column names within 'data.out' dataframe returns have been replaced with use of original, or modified-off-original, column names and a separate $cols_use output naming the column mappings - others?

ToDo HERE:

  • [x] add dittoViz version 1.0.5+ requirement
  • [x] Assess 'data.out' element names, and update docs
  • [x] Completed pass on 'data.out' / 'data.only' documentation
  • [x] Assess reverse dependencies
    • [x] re-export dittoColors insted of removing it from dittoSeq
  • [x] Testing for added features:
    • [x] 'add.line' & 'add.(x|y|ab)line'
    • [x] 'labels.use.numbers'
    • [x] 'data.only'

ToDo before full release:

  • [ ] Assess and improve 'hover.data' defaults
  • [ ] Bring back adjustments for 'extra.vars'?
  • [ ] Finally allow adjustments for metadata?
  • [ ] Attach implementation of function-based adjustments via '*.adj.fxn' inputs.
  • [ ] Full updates to '@details' sections that adds extraction -> dittoViz details
  • [ ] Check/improve passage of group aesthetic for sub-grouped yPlot representations

dtm2451 avatar Oct 07 '25 16:10 dtm2451