Assigned custom colors for contour plot are not correctly displayed

For "\Options\Contour plot\Custom", I've edited the top color in the "Custom Colors" image and assigned it as pure red (rgb=255,0,0) (the right image). (This rgb was verified using PowerToys Color Picker.)



However, when the model is displayed this color is not correct. Visually you can see that the "reds" for the legend and model are somewhat dull. Using PowerToys Color Picker (the right image), the actual color of the "red" is rgb=240,28,0. This is the same for the "red" in both the legend and the model. The same problem is true for several other colors that I've tried -- the displayed colors are close to the assigned colors but are not identical.


Comments

  • A couple of factors that affect it:

    The specified colors include the top and bottom values in the range but the display uses the color interpolated at the middle of each sub-interval. So in your screenshot, the displayed red is for the whole sub-interval 1.022 to 1.136 but the specified pure red is only for the extreme value 1.136. It looks like you can compensate for this by duplicating each color as in the attached image.

    Lighting changes the color of the model depending on the orientation of the faces.
  • Victor --

    I'm trying to find colors that convey the FEA info and that look good on the screen, on color printout, and on gray-scale printout. Your suggestion of duplicating the colors works in a way. I tried duplicating the red color in "Custom colors". The legend then displays pure red (rgb=255,0,0) at the top but the next "red" is (243,47,0). Hence, duplicating the existing 10 colors will actually give 20 different colors on the display.

    However, I only want 10 colors displayed on the model and in the legend. Otherwise, the model's display becomes overly "busy" and adjacent colors may be difficult to distinguish on the above devices.

    I realize the effect of lighting. That's why I chose the bottom view of the model and also the legend which has no light dependency. (In this arrangement, the colors of the model and legend agree.)

    Aside -- After achieving the desired colors in Mecway, I want to duplicate these in Paraview. I'd prefer not to use Paraview but it has several advantages --
    • The view orientation of the model can be specified numerically (no mousing needed). This allows easy duplication later or among different models. Also, the state of the model can be saved and restored.
    • Slicing is cleaner in Paraview (no jagged elements).
    My main objection to Paraview is that it apparently can't display the model's edges with discrete lines without also displaying the mesh. Also, although Paraview is powerful it isn't straightforward.
  • If you set the "Number of colors" to 10 but have 20 colors specified, it keeps them distinct.

    I understand those other issues and they're on my list for future updates.

    Although this is tedious, you can get predictable view orientations using the keyboard (F4/F5 and ALT+left/right/up/down which each rotate in 5 degree increments.
  • Duplicating the colors and setting the number of colors to 10 works. Some extra work but that's OK. (I confess that I don't see the advantage to interpolating the colors. As I see it the colors are only a visual representation of the performance. Hence, if the legend shows true red and the model shows the same, then this conveys the same information as if the legend shows dull red and the model shows the same. The only difference is that dull red isn't my preferred color. In Paraview the displayed colors are the same as the assigned colors.)

    It seems that the rotations with the keyboard are about the screen axes. There should be a method to rotate about the orthogonal axes. Also, it would be helpful to allow the user to choose the rotation increment instead of a fixed 5 degrees.

    Despite some limitations, I think Mecway is an incredible value. I look forward to further enhancements.
  • In what file are the contour colors saved so that I can make backups? What else is saved in this file?
  • Interpolating is to decouple the number of displayed colors from the number of defined colors. That way, you can change the number of colors, perhaps to reveal detail in a special case, or to highlight a zero-crossing without redefining them all.

    All the configuration data is stored in the user.config file in the appropriate sub-directory within %localappdata%/Mecway_Limited
  • Can the path to Mecway_Limited be specified elsewhere for easier backup? For example, I have my Mecway backup set to E:\Data\Mecway and I would like to put the Mecway_Limited folder there (E:\Data\Mecway\Mecway_Limited).
  • No, sorry. Perhaps use a symlink?
  • I wasn't aware of symlink. This works after a fashion. All links are "live" (concurrent) so any changes made in Mecway_limited are immediately also changed in the online backup. Thus, you can't use the backup to restore user.config to a previous state. However, this is OK since I just manually create incremental backups -- i.e., user.b1.config, user.b2.config, etc. (for later restore).

    In a future Mecway version you might add an option for a user-defined path to Mecway_limited.
  • I probably won't make it configurable. The location is managed by .Net which also does things like transferring settings to updated installs of the software. Microsoft has somehow decided that's where applications should store their settings and I think it's easiest and safest to follow that.
  • Hello @dculp

    You were quite right that the colors are being interpolated badly. I hadn't understood that there was a better way but there is and the version after next (v18) will have more sensible interpolation that includes the two extreme colors and matches the custom colors exactly when there are the same number of them. The existing interpolation will still be available in case you need legacy compatibility.

    It'll also have the perceptually uniform color maps Viridis and Turbo which are better for printing in greyscale.
  • Thanks for the proposed improvements.

    Since I want to publish to my website, any guess about the release date for v18?
  • Hopefully before the end of 2022.
  • I'll look forward to it. Thanks.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!