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
      • singlecell_input_mapper
      • spike_analysis
      • visualize
        • _decorators
        • _figure_array_converter
        • cell_morphology_visualizer
        • cell_to_ipython_animation
        • current_visualizer
        • dendrogram
        • histogram
        • manylines
        • rasterplot
        • utils
          • Arrow3D
          • write_video_from_images
          • write_gif_from_images
          • _load_base64
          • display_animation_from_images
          • find_files_and_order_them
          • _arrow3D
          • draw_arrow
          • value_to_color
            • Fvisualize.utils.value_to_color
              • Parameters
              • Returns
              • Return type
        • voltage_trace_visualizer
        • vtk
        • svg2emf
        • plot_hoc
    • Tutorials
    • Installation
    • File & data formats
    • Bibliography
    • Fvisualize.utils.value_to_color
      • Parameters
      • Returns
      • Return type

    visualize ❭ utils ❭ value_to_color

    value_to_color¶

    visualize.utils.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 draw_arrow
    Next voltage_trace_visualizer
    © Copyright 2025 Max Planck Institute for Neurobiology of Behavior - CAESAR.
    Created using Sphinx 7.1.2. and Sphinx-Immaterial