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

Subplot themes not inherited by parent #197

Closed
Martmists-GH opened this issue Aug 2, 2023 · 1 comment
Closed

Subplot themes not inherited by parent #197

Martmists-GH opened this issue Aug 2, 2023 · 1 comment
Assignees
Milestone

Comments

@Martmists-GH
Copy link

The following two plots have been set to use the Darcula theme:
Screenshot_20230802_180208

However, There is still spacing and a border in white. This cannot currently be solved as SubPlotsFeature does not support themeing.

Code:

// Subplot 1
val freq = letsPlot(mapOf(
    "frequency" to fftData.indices,
    "gain (dB)" to fftData.map(Complex::length),
)) + geomLine() {
    x = "frequency"
    y = "gain (dB)"
} + scaleXLog10() + scaleYLog10()
// Subplot 2
val phase = letsPlot(mapOf(
    "frequency" to fftData.indices,
    "phase (rad)" to fftData.map(Complex::angle),
)) + geomLine {
    x = "frequency"
    y = "phase (rad)"
} + scaleXLog10()
// Parent plot
val grid = gggrid(
    plots=listOf(freq, phase).map { it + flavorDarcula() },  // Apply theme
    ncol = 1,
)  // + flavorDarcula()  // Unsupported
grid.show()
@alshan
Copy link
Collaborator

alshan commented Nov 7, 2023

Fixed in v4.5.0: Common Theme for Subplots.
However, inheritance works other way around: elements inherit theme of their container.

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

No branches or pull requests

2 participants