Skip to content

Added four Visualizer colormap function and png files#4737

Open
smathimech wants to merge 8 commits intomodelica:masterfrom
smathimech:colormap_#4689
Open

Added four Visualizer colormap function and png files#4737
smathimech wants to merge 8 commits intomodelica:masterfrom
smathimech:colormap_#4689

Conversation

@smathimech
Copy link

@smathimech smathimech commented Feb 12, 2026

This MR address this issue #4689

Details:

  • Added four different colormap function for visualizer.
  • Conversion script not requires (adding new function).

@CLAassistant
Copy link

CLAassistant commented Feb 12, 2026

CLA assistant check
All committers have signed the CLA.

@smathimech smathimech closed this Feb 12, 2026
@smathimech smathimech reopened this Feb 12, 2026
@smathimech
Copy link
Author

smathimech commented Feb 12, 2026

This is my first contribution to this modelica repository. I'm part of Modelon, India. I hope that, signed the CLA correctly.

@thorade
Copy link
Contributor

thorade commented Feb 12, 2026

Mathi, thanks for adding these colormaps. You used two email addresses while committing, can you add the second address also to your github profile?

The existing colormaps are all in this overview/comparison, maybe the new maps could be added there as well?
https://github.com/modelica/ModelicaStandardLibrary/blob/master/Modelica/Resources/Images/Mechanics/MultiBody/Visualizers/Colors/ColorMaps/ColorMaps.png

@smathimech
Copy link
Author

ColorMaps

Since i don't the original source file of this colormap, it's quite difficult to get similar represenations. Let me know, if this need to improved further.

Copy link
Contributor

@tobolar tobolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution. Please consider my comments below (resctricted to Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps).

  1. The definition of Plasma and Viridis seems to be identical.

  2. TrafficlightColor can even be renamed to TrafficLight.

  3. Function name shall start with a lower case letter (see Modelica.UsersGuide.Conventions.ModelicaCode.Naming):

    • CoolWarm -> coolWarm
    • TrafficlightColor similarly
    • Plasma similarly
    • Viridis similarly

    When renamed, please update also figure Modelica/Resources/Images/Mechanics/MultiBody/Visualizers/Colors/ColorMaps/ColorMaps.png accordingly.

  4. Class description string is missing in

    • TrafficlightColor
    • Plasma
    • Viridis
  5. For TrafficlightColor, maybe the default n_colors=3 makes more sense.

@smathimech
Copy link
Author

Thanks for this contribution. Please consider my comments below (resctricted to Modelica.Mechanics.MultiBody.Visualizers.Colors.ColorMaps).

  1. The definition of Plasma and Viridis seems to be identical.

  2. TrafficlightColor can even be renamed to TrafficLight.

  3. Function name shall start with a lower case letter (see Modelica.UsersGuide.Conventions.ModelicaCode.Naming):

    • CoolWarm -> coolWarm
    • TrafficlightColor similarly
    • Plasma similarly
    • Viridis similarly

    When renamed, please update also figure Modelica/Resources/Images/Mechanics/MultiBody/Visualizers/Colors/ColorMaps/ColorMaps.png accordingly.

  4. Class description string is missing in

    • TrafficlightColor
    • Plasma
    • Viridis
  5. For TrafficlightColor, maybe the default n_colors=3 makes more sense.

Thanks for the comments.

  1. Both colormap might identical, but it might be have some use case.
  2. Renamed to TrafficLight.
  3. All four function name start's with small letter.
  4. updated the figure and string description details as well.
  5. For TrafficLight, have applied the modifier n_colors=3.

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

Successfully merging this pull request may close these issues.

4 participants