Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved the R code in parallel coordinates plot dialog #8987

Merged
merged 5 commits into from
Jun 1, 2024

Conversation

Vitalis95
Copy link
Contributor

Fixes partially #8985
@rdstern @N-thony , this fixes parallel coordinates plot dialog. I will do the remaining part in a separate PR

Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vitalis95 that's great - and it seems to work. Just one small point.

# Dialog: Parallel Coordinate Plot

iris <- data_book$get_data_frame(data_name="iris")
column_numbers <- match(c("Sepal.Length","Sepal.Width","Petal.Length","Petal.Width"), names(iris))
last_graph <- GGally::ggparcoord(data=iris, columns=c("Sepal.Length","Sepal.Width","Petal.Length","Petal.Width"), 
groupColumn="Species", missing="exclude", order=column_numbers, centerObsID=1) + theme_grey()

data_book$add_object(data_name="iris", object_name="last_graph", object_type_label="graph", object_format="image", object=check_graph(graph_object=last_graph))
data_book$get_object_data(data_name="iris", object_name="last_graph", as_file=TRUE)
rm(list=c("last_graph", "iris", "column_numbers"))

Why not make columns=column_numbers in the code? There will sometimes be a lot of columns and there is then no need to repeat the names twice?

Then I would like to merge this quickly, so very happy for the other problem to be in a separate pull request.

@Vitalis95
Copy link
Contributor Author

@rdstern , have a look at it

rdstern
rdstern previously approved these changes May 23, 2024
Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vitalis95 that's great. Well done both of us! @N-thony could you check and (I hope) merge.

Copy link
Collaborator

@N-thony N-thony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Vitalis95 good, just few comments

instat/dlgParallelCoordinatePlot.vb Outdated Show resolved Hide resolved
Comment on lines 444 to 446
Private Sub ucrReceiverXVariables_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverXVariables.ControlValueChanged
clsMatchFunction.AddParameter("var", ucrReceiverXVariables.GetVariableNames, bIncludeArgumentName:=False, iPosition:=0)
End Sub
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here
ucrReceiverXVariables.AddAdditionalCodeParameterPair(clsMatchFunction, New RParameter("var", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Collaborator

@N-thony N-thony left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rdstern over to you

Copy link
Collaborator

@rdstern rdstern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving again, so @N-thony can merge

@N-thony N-thony merged commit 5fca7f3 into IDEMSInternational:master Jun 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants