add plot modification after declaration and initialization
- Dominant language
- Kotlin
- Stars
- 744
- Forks
- 27
- Avg merge
- 4d 1h
- Merged PRs (30d)
- 1
Description
I want to save my plot to a variable, and then add or change some parameters.
For example, I have a plot and I want to use it with different flavours
Right now, my code looks like this:
```kotlin
val myPlot = plot {
line {
x(listOf(1, 2, 3))
y(listOf(5, 3, 1))
}
}
(plot.features as MutableMap)[FeatureName("layout")] = Layout(flavor = Flavor.DARCULA)
plot.save(...)
(plot.features as MutableMap)[FeatureName("layout")] = Layout(flavor = Flavor.HIGH_CONTRAST_LIGHT)
plot.save(...)
```
Contributor guide
Research direction
Start by tracing how the plot builder creates the plot, how `features` stores layout values, and how `plot.save(...)` consumes them. Define what post-initialization changes should be supported and how the same plot can be saved with different flavors; done means the example works without directly casting `features` to `MutableMap`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- data-visualization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100