How can I plot a matrix using pcolor and colorscale as log?
I have a timeseries matrix data of a lidar. I want to plot the time series keeping colorbar as logscale.
I have written the following code but it shows an error
load time_June.mat
load elevation_June_5km.mat
load backscatter_June_5km.mat
load raw_backscatter_June_5km.mat
figure(1);
pcolor(time_June, elevation_June_5km, backscatter_June_5km); shading interp
c = colorbar;
caxis([10^-7 10^-4]);
set(gca, ‘ColorScale’, ‘log’);
c.Label.String = ‘Attenuated backscatter coefficient (m^{-1} sr^{-1})’;
c.Ruler.Scale = ‘log’;
c.Ruler.MinorTick = ‘on’;
colormap jet;
set(gca, ‘YDir’, ‘normal’);
xlabel(‘Time (LT)’);
ylabel(‘Altitude (km)’);
axis tight;
set(gca, ‘FontName’, ‘Times’, ‘FontSize’, 14);
startDate = datetime(2023, 6, 16);
endDate = datetime(2023, 6, 25);
xlim([startDate, endDate]);
Error:
Warning: Error creating or updating Surface
Error in value of property CData
DataSpace or ColorSpace transform method failed.I have a timeseries matrix data of a lidar. I want to plot the time series keeping colorbar as logscale.
I have written the following code but it shows an error
load time_June.mat
load elevation_June_5km.mat
load backscatter_June_5km.mat
load raw_backscatter_June_5km.mat
figure(1);
pcolor(time_June, elevation_June_5km, backscatter_June_5km); shading interp
c = colorbar;
caxis([10^-7 10^-4]);
set(gca, ‘ColorScale’, ‘log’);
c.Label.String = ‘Attenuated backscatter coefficient (m^{-1} sr^{-1})’;
c.Ruler.Scale = ‘log’;
c.Ruler.MinorTick = ‘on’;
colormap jet;
set(gca, ‘YDir’, ‘normal’);
xlabel(‘Time (LT)’);
ylabel(‘Altitude (km)’);
axis tight;
set(gca, ‘FontName’, ‘Times’, ‘FontSize’, 14);
startDate = datetime(2023, 6, 16);
endDate = datetime(2023, 6, 25);
xlim([startDate, endDate]);
Error:
Warning: Error creating or updating Surface
Error in value of property CData
DataSpace or ColorSpace transform method failed. I have a timeseries matrix data of a lidar. I want to plot the time series keeping colorbar as logscale.
I have written the following code but it shows an error
load time_June.mat
load elevation_June_5km.mat
load backscatter_June_5km.mat
load raw_backscatter_June_5km.mat
figure(1);
pcolor(time_June, elevation_June_5km, backscatter_June_5km); shading interp
c = colorbar;
caxis([10^-7 10^-4]);
set(gca, ‘ColorScale’, ‘log’);
c.Label.String = ‘Attenuated backscatter coefficient (m^{-1} sr^{-1})’;
c.Ruler.Scale = ‘log’;
c.Ruler.MinorTick = ‘on’;
colormap jet;
set(gca, ‘YDir’, ‘normal’);
xlabel(‘Time (LT)’);
ylabel(‘Altitude (km)’);
axis tight;
set(gca, ‘FontName’, ‘Times’, ‘FontSize’, 14);
startDate = datetime(2023, 6, 16);
endDate = datetime(2023, 6, 25);
xlim([startDate, endDate]);
Error:
Warning: Error creating or updating Surface
Error in value of property CData
DataSpace or ColorSpace transform method failed. pcolor, logscale, colorbar, matrix MATLAB Answers — New Questions