Skip to content

Latest commit

 

History

History
163 lines (92 loc) · 3.72 KB

File metadata and controls

163 lines (92 loc) · 3.72 KB

MATLAB color themes

"MATLAB color themes" is a library that contains various different color themes designed to be used together with the MATLAB-app designer and MATLAB plots.

Without color theme:

my_plot = plot(0:0.01:10, (1:10)'*sin(0:0.01:10))

Different color themes:

fireflies:

my_plot = plot(0:0.01:10, (1:10)'*sin(0:0.01:10))
fireflies()

borealis:

my_plot = plot(0:0.01:10, (1:10)'*sin(0:0.01:10))
borealis()

sangbok:

my_plot = plot(0:0.01:10, (1:10)'*sin(0:0.01:10))
sangbok()

dark_mode:

my_plot = plot(0:0.01:10, (1:10)'*sin(0:0.01:10))
dark_mode()

dark_mode2:

my_plot = plot(0:0.01:10, (1:10)'*sin(0:0.01:10))
dark_mode2()

Changing the amount of colors before it repeats:

my_plot = plot(0:0.01:10, (1:40)'*sin(0:0.01:10))
fireflies("ColorSamples", 10)

Different plot-types:

my_plot = membrane()
fireflies();

Used together with UI-figures and MATLAB-appdesigner:

my_app = rear_axel_dashboard;

fireflies();

Plotting multiple plots with different colorthemes:

myplot1 = subplot(1,2,1)
plot(0:0.1:10, sin(0:0.1:10));
myplot2 = subplot(1,2,2)
plot(0:0.1:10, cos(0:0.1:10));

borealis( "Figure", myplot2)
fireflies("Figure", myplot1)

Creating your own color theme:

function my_colortheme(varargin)

colortheme_process_inputs_subroutine

color1 = [255 255 100]/255;
color2 = [255 0   0  ]/255;
color3 = [70  0   220]/255;
color4 = [0   0   0  ]/255;

BACKGROUND_COLOR_1 = [15  0 20]/255;
BACKGROUND_COLOR_2 = [15  0 20]/255;
AXES_COLOR         = [250 0 150]/255;

NEW_COLORORDER     = create_colormap(color1, color2, color3, color4, number_of_hues);
NEW_COLORMAP       = create_colormap(color4, color3, color2, color1, 256);

colortheme_assign_colors_subroutine

end

Gallery