Hello,
I have a 'patch' plot with x, y, and z-values. A 2×2 sublot is desired with a single colorbar on the right. The values of the colorbar should be from 0 to 1. However, the values in the plot are an order of magnitude off. My largest value in the upper left plot, for example, is somewhere around 0.08. But, the figure is plotting the value as 0.8.
I've attached my plotting script (below) and the variables needed (attached).
Any ideas?
Thanks.
fig = figure; subplot(2, 2, 1) patch(X, Y, norm_DSVD_sum2019_JER,'HandleVisibility','off'); title('Summer 2019, Las Cruces, NM', 'FontSize', 12) xlim([0 8]) ylim([0 11]) xticks([0 1.25 2.5 5.0 8.0 10.0 20.0 26.0]) yticks([0 1.0 2.0 4.0 8.0 11.0 16.0 22.4]) grid off hold on p1 = plot(X, vD_AfGK, 'r', 'LineWidth', 2); p2 = plot(X, vD_AU, 'r--', 'Linewidth', 2, 'LineStyle', '--'); p3 = plot(X, vD_VD, 'r', 'Linewidth', 2, 'LineStyle', ':'); subplot(2, 2, 2) patch(X, Y, norm_DSVD_win2019_JER,'HandleVisibility','off'); title('Winter 2019, Las Cruces, NM', 'FontSize', 12) xlim([0 8]) ylim([0 11]) xticks([0 1.25 2.5 5.0 8.0 10.0 20.0 26.0]) yticks([0 1.0 2.0 4.0 8.0 11.0 16.0 22.4]) grid off hold on p1 = plot(X, vD_AfGK, 'r', 'LineWidth', 2); p2 = plot(X, vD_AU, 'r--', 'Linewidth', 2, 'LineStyle', '--'); p3 = plot(X, vD_VD, 'r', 'Linewidth', 2, 'LineStyle', ':'); subplot(2, 2, 3) patch(X, Y, norm_DSVD_sum2019_SFL,'HandleVisibility','off'); title('Summer 2019, Mesa, AZ', 'FontSize', 12) xlim([0 8]) ylim([0 11]) xticks([0 1.25 2.5 5.0 8.0 10.0 20.0 26.0]) yticks([0 1.0 2.0 4.0 8.0 11.0 16.0 22.4]) grid off hold on p1 = plot(X, vD_AfGK, 'r', 'LineWidth', 2); p2 = plot(X, vD_AU, 'r--', 'Linewidth', 2, 'LineStyle', '--'); p3 = plot(X, vD_VD, 'r', 'Linewidth', 2, 'LineStyle', ':'); subplot(2, 2, 4) patch(X, Y, norm_DSVD_win2019_SFL,'HandleVisibility','off'); title('Winter 2019, Mesa, AZ', 'FontSize', 12) xlim([0 8]) ylim([0 11]) xticks([0 1.25 2.5 5.0 8.0 10.0 20.0 26.0]) yticks([0 1.0 2.0 4.0 8.0 11.0 16.0 22.4]) grid off hold on p1 = plot(X, vD_AfGK, 'r', 'LineWidth', 2); p2 = plot(X, vD_AU, 'r--', 'Linewidth', 2, 'LineStyle', '--'); p3 = plot(X, vD_VD, 'r', 'Linewidth', 2, 'LineStyle', ':'); lgd = legend([p1(1) p2(1) p3(1)],'Atlas et. al., 1973', 'Atlas and Ulbrich, 1977', 'van Dijk et. al., 2002', 'Position', [.72 .12 .14 .1]); lgd.FontSize = 6.5; lgd.Title.String = 'Droplet Size/Velocity Relationships'; sgt = sgtitle('Drop Size and Velocity Distributions'); sgt.FontSize = 20; ax = axes(fig); yyaxis(ax, 'left'); han = gca; han.Visible = 'off'; set(gca, 'ycolor', 'k') han.XLabel.Visible = 'on'; han.YLabel.Visible = 'on'; xlabel('Raindrop Size [mm]') ylabel('Raindrop Speed [m/s]') yyaxis(ax, 'right'); c = colorbar('Position', [0.9214, 0.0935, 0.0165, 0.8147]); c.Label.String = 'Raindrop Count'; c.Label.FontSize = 12; colormap('jet') han.YLabel.Visible = 'on';
Best Answer