Skip to content
logo
In Silico Framework
value_to_color
Initializing search
    in_silico_framework
    • API reference
    • Tutorials
    • Installation
    • File & data formats
    • Bibliography
    in_silico_framework
    • API reference
      • Interface
      • biophysics_fitting
      • data_base
      • simrun
      • single_cell_parser
        • analyze
        • cell_modify_functions
        • network_modify_functions
        • network_param_modify_functions
        • cell
        • cell_parser
        • network
        • network_realizations
        • reader
        • scalar_field
        • serialize_cell
        • sim_control
        • synapse
        • synapse_mapper
        • writer
          • write_landmark_file
          • write_sim_results
          • write_all_traces
          • write_cell_synapse_locations
          • write_pruned_synapse_locations
          • write_functional_realization_map
          • write_synapse_activation_file
          • write_synapse_weight_file
          • write_PSTH
          • write_spike_times_file
          • write_presynaptic_spike_times
          • write_cell_simulation
          • write_functional_map
          • generate_landmark_template
          • write_landmarks_colorcoded_to_folder
          • value_to_color
            • Fsingle_cell_parser.writer.value_to_color
              • Parameters
              • Returns
              • Return type
        • Event
        • build_parameters
        • load_NMODL_parameters
        • create_cell
        • init_neuron_run
        • sec_distance_to_soma
        • spines_update_synapse_distribution_file
        • spines_update_network_paramfile
      • singlecell_input_mapper
      • spike_analysis
      • visualize
    • Tutorials
    • Installation
    • File & data formats
    • Bibliography
    • Fsingle_cell_parser.writer.value_to_color
      • Parameters
      • Returns
      • Return type

    single_cell_parser ❭ writer ❭ value_to_color

    value_to_color¶

    single_cell_parser.writer.value_to_color(v, vmin=0, vmax=1)¶

    Map a value to a color.

    See: https://stackoverflow.com/questions/15140072/how-to-map-number-to-color-using-matplotlibs-colormap

    Parameters:¶
    • v (float) – The value to map to a color.

    • vmin (float) – The minimum value of the range. Default is 0.

    • vmax (float) – The maximum value of the range. Default is 1.

    Returns:¶

    The RGBA color tuple.

    Return type:¶

    tuple

    Previous write_landmarks_colorcoded_to_folder
    Next Event
    © Copyright 2025 Max Planck Institute for Neurobiology of Behavior - CAESAR.
    Created using Sphinx 7.1.2. and Sphinx-Immaterial