All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.jetbrains.datalore.plot.config.PlotAesBindingSetup.kt Maven / Gradle / Ivy

/*
 * Copyright (c) 2022. JetBrains s.r.o.
 * Use of this source code is governed by the MIT license that can be found in the LICENSE file.
 */

package jetbrains.datalore.plot.config

import jetbrains.datalore.plot.base.Aes
import jetbrains.datalore.plot.base.DataFrame
import jetbrains.datalore.plot.builder.VarBinding

internal class PlotAesBindingSetup(
    private val varBindings: List,
    val dataByVarBinding: Map,
    val variablesByMappedAes: Map, List>,

    ) {
    fun mappedAesWithoutStatPositional(): Set> {
        return varBindings.filterNot { it.variable.isStat && Aes.isPositionalXY(it.aes) }
            .map { it.aes }.toSet()
    }

    fun dataByVarBindingWithoutStatPositional(): Map {
        return dataByVarBinding.filterNot { (binding, _) ->
            binding.variable.isStat && Aes.isPositionalXY(binding.aes)
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy