From 8baf3fb764da65b14cc4b8057ec4db3f0bf58c06 Mon Sep 17 00:00:00 2001 From: Derrick Agorhom <76208189+derekagorhom@users.noreply.github.com> Date: Wed, 14 Feb 2024 12:40:03 +0100 Subject: [PATCH] Removing mapping function from the dotplot and add new options when the factor receiver is filled --- instat/dlgHistogram.vb | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb index 850fb1e5099..bbabb30553f 100644 --- a/instat/dlgHistogram.vb +++ b/instat/dlgHistogram.vb @@ -257,8 +257,21 @@ Public Class dlgHistogram If rdoHistogram.Checked Then If ucrChkDisplayAsDotPlot.Checked Then clsRgeomPlotFunction.SetRCommand("geom_dotplot") + clsRgeomPlotFunction.RemoveParameterByName("mapping") + If Not ucrFactorReceiver.IsEmpty Then + clsRgeomPlotFunction.AddParameter("binpositions", Chr(34) & "all" & Chr(34), iPosition:=0) + clsRgeomPlotFunction.AddParameter("stackgroups", "TRUE", iPosition:=1) + Else + clsRgeomPlotFunction.RemoveParameterByName("binpositions") + clsRgeomPlotFunction.RemoveParameterByName("stackgroups") + End If Else clsRgeomPlotFunction.SetRCommand("geom_histogram") + clsRgeomPlotFunction.AddParameter("mapping", clsRFunctionParameter:=clsHistAesFunction) + If Not ucrFactorReceiver.IsEmpty Then + clsRgeomPlotFunction.RemoveParameterByName("binpositions") + clsRgeomPlotFunction.RemoveParameterByName("stackgroups") + End If End If ucrFactorReceiver.ChangeParameterName("fill") If Not ucrSaveHist.bUserTyped Then ucrSaveHist.SetPrefix("histogram")