Skip to content

Instantly share code, notes, and snippets.

@ozgurgulsuna
Last active August 12, 2022 16:38
Show Gist options
  • Save ozgurgulsuna/f653d5219191e5545b97ec329ef3c15d to your computer and use it in GitHub Desktop.
Save ozgurgulsuna/f653d5219191e5545b97ec329ef3c15d to your computer and use it in GitHub Desktop.
matlab, colorbar, colormap
%%
clc
clear ;
close all
%%
figure;
set(gcf,'Position',[0 0 1000 500]);
set(0,'defaulttextinterpreter','latex');
set(gca,'TickLabelInterpreter','latex') ;
%%
colormap gray
max_value = 54.25;
min_value = 45.75;
dummysurface = (peaks-min(min(peaks)))/(max(max((peaks-min(min(peaks)))))); %% Normalize
dummysurface = dummysurface*(max_value-min_value)+min_value;
surf(dummysurface)
set(0,'DefaultLegendInterpreter','latex')
c = colorbar('southoutside', 'FontSize',18);
set(c,'TickLabelInterpreter','latex');
exportgraphics(gcf,'C:\Users\ozgur\Desktop\vectorfig.pdf','ContentType','vector')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment