make "plot" visualization more visible

5 views (last 30 days)
Michael Ghorbanzadeh
Michael Ghorbanzadeh on 20 Jul 2020
Answered: Leepakshi on 7 Mar 2025
I have 5 plots in a figure. One plot has a lot more points (gray color in the figure with about 4000 points) and hence while other a few hundred. I put the color for the larger set curve to gray in order to make the other 4 plots (shown in green, orange, and purple) more visible (following script). I also made the 'Linewidth' for gray curve to 0.5. Are the any suggestions to make the other 4 curves (shown as orange, green, red, and purple) more visible?
newcolors = [0.83 0.14 0.14
1.00 0.54 0.00
0.47 0.25 0.80
0.25 0.80 0.54
0.7 0.7 0.7];
colororder(newcolors)
  1 Comment
jonas
jonas on 20 Jul 2020
Linewidth 0.5 is default, so does not change anything. Could try setting the others to 1.0. Try changing the stackorder as well so that gray is on top.

Sign in to comment.

Answers (1)

Leepakshi
Leepakshi on 7 Mar 2025
Hi Michael,
To enhance the visibility of the four curves (orange, green, red, and purple) against the gray curve with many points, I recommend you try out these methods:
  1. Increase Line Width for Colorful Curves: Make the lines for the colorful curves thicker to help them stand out more against the gray curve.
plot(x1, y1, 'LineWidth', 2); % Orange curve
plot(x2, y2, 'LineWidth', 2); % Green curve
plot(x3, y3, 'LineWidth', 2); % Red curve
plot(x4, y4, 'LineWidth', 2); % Purple curve
  1. Use Different Line Styles: Apply different line styles (e.g., dashed, dotted) to the colorful curves to make them distinct.
plot(x1, y1, '--', 'LineWidth', 2); % Orange curve
plot(x2, y2, ':', 'LineWidth', 2); % Green curve
plot(x3, y3, '-.', 'LineWidth', 2); % Red curve
plot(x4, y4, '-', 'LineWidth', 2); % Purple curve
  1. Adjust Transparency of the Gray Curve: Make the gray curve semi-transparent to reduce its visual dominance.
plot(x_gray, y_gray, 'Color', [0.7 0.7 0.7 0.3], 'LineWidth', 0.5); % Gray curve with transparency
By implementing these suggestions, you should be able to make the colorful curves more prominent and distinguishable from the gray curve.
Hope this helps!

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!