Skip to content

Conversation

@azeredo-e
Copy link

Changes

Plotting

Changed the plotting implementation from the standard Plots package to the RecipesBase package. RecipesBase is a lightweight package by the Plots team that allows for third party software to interact with the Plots package without the need to import everything onto the project. It is a preferred method to implement plotting using the Plots package in third party packages.

This modifies the two previous function, plotGAM and PartialDependencePlot renaming them to plotgam and partialdependenceplot. This doesn't affect their usability, their parameter call stays the same; as a bonus, it adds the ability to pass additional keyword arguments to the plotting function, like linecolor, label, etc like so plotgam(mod, linecolor=:red).

The second modification is that the standard plot function from Plots package now accepts a GAMData type. Running plot(mod) will give the same result as plotgam(mod), aditionaly the keyword argument var is also available and, when passed, the function behaves just like partialdependenceplot, e.g. plot(mod, var=1).

Test

A testing target has been created in the Project.toml file, isolating test packages from necessary packages for the use of GAM.jl.

@azeredo-e azeredo-e changed the title Refactor the plotting framework to use the RecipsBase framework Refactor the plotting framework to use the RecipesBase framework Sep 25, 2025
@azeredo-e azeredo-e changed the title Refactor the plotting framework to use the RecipesBase framework Refactor the plotting framework to use the RecipesBase package Sep 25, 2025
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.

1 participant