I have a polar plot that has colored contours. I cannot figure out how to add my axis. The code is below:
close all
data1 = xlsread('C:\Users\Desktop\practice.xlsx','theta');
data2 = xlsread('C:\Users\Desktop\practice.xlsx','r');
data3 = xlsread('C:\Users\Desktop\practice.xlsx'','z');
t = data1(1,:);
r = data2(:,1);
z = data3(:,:);
figure(1)
title('Displacement')
polarcont(r,t,z)
myColorMap = colormap;
myColorMap(1,:) = [1 1 1];
colormap(myColorMap);
colorbar;
caxis([0 25]);
beta = 0.9;
brighten(beta)
From here I cannot figure out how to plot my axes. For instance at theta=0, I would like [100], etc. Whenever I try what usually works,
thetaticks([0 15 30 45 60 75 90 105 120 135 150 165 180 195 210 225 240 255 270 285 300 315 330 345])
rticks([100 200 300])
rticklabels({'100 eV','200 eV','300 eV'})
ax = gca;
ax.ThetaAxis.TickLabelInterpreter = 'latex';
ax.ThetaTickLabel = {'[100]','','','[101]','','','[001]','','','[$\overline{1}$01]','','','[$\overline{1}$00]','','','[$\overline{1}$0$\overline{1}$]','','','[00$\overline{1}$]','','','[10$\overline{1}$]','','','[$\overline{1}$0$\overline{1}$]'};
I just get riddled with errors involving trying to use polar axes on a cartesian chart. I can plot circles below which can give me the different r mag, but seems kind of a silly way to do it to me: (below)
plotting_circle(0,0,100);
plotting_circle(0,0,200)
plotting_circle(0,0,300)
plotting_circle(0,0,400)
axis equal
axis off
I want to add labels to these circles. First circle is 100 eV, second is 200 eV, etc.
But I also want axis labels around the circle corresponding to direction. Can I automate this with MATLAB or do I just need to do it manually?