I am plotting two experiments on the same x axis. I want to keep the xaxis from 7/11 to 7/14 and 7/18 to 7/20, but I want to cut out the space inbetween (7/14 to 7/18). Is this possible.
This is my figure code now:
f1 = figure(1)subplot(2,1,1)hold on plot(time_hr,ph_hr(1,:),'o','color','r','markersize',3);plot(time_hr,ph_hr(2,:),'o','color',[1.0 .6 0.0],'markersize',3);plot(time_hr,ph_hr(3,:),'o','color',[0 .4 .2],'markersize',3); plot(time_hr,ph_hr(4,:),'o','color',[0 .6 1],'markersize',3); plot(time_hr,ph_hr(5,:),'o','color',[.2 0 .6],'markersize',3);% plot(MX,PK.PH(2,:),'color',[0 .4 .2])
% plot(MX,PK.PH(8,:),'color',[.2 0 .6])
set(gca,'fontsize', 16)ylabel('pH') title('HR2 and HR3')x = datenum('July-11-2018'):1:datenum('July-20-2018');xx = datenum('July-11-2018'):.25:datenum('July-20-2018'); set(gca,'XTick', x);ax=gca;ax.XAxis.MinorTick = 'on'ax.XAxis.MinorTickValues = xxdatetick('x','mm/dd','keepticks')xlim([datenum('July-11-2018 00:00') datenum('July-20-2018 00:00')]); subplot(2,1,2)hold on plot(time_hr,temp_hr(1,:),'o','color','r','markersize',3);plot(time_hr,temp_hr(2,:),'o','color',[1.0 .6 0.0],'markersize',3);plot(time_hr,temp_hr(3,:),'o','color',[0 .4 .2],'markersize',3); plot(time_hr,temp_hr(4,:),'o','color',[0 .6 1],'markersize',3); plot(time_hr,temp_hr(5,:),'o','color',[.2 0 .6],'markersize',3);% plot(MX,PK.TEMP(2,:),'color',[0 .4 .2])
% plot(MX,PK.TEMP(8,:),'color',[.2 0 .6])
set(gca,'fontsize', 16)ylabel('Temperature \circC') x = datenum('July-11-2018'):1:datenum('July-20-2018');xx = datenum('July-11-2018'):.25:datenum('July-20-2018'); set(gca,'XTick', x);ax=gca;ax.XAxis.MinorTick = 'on'ax.XAxis.MinorTickValues = xxdatetick('x','mm/dd','keepticks')xlim([datenum('July-11-2018 00:00') datenum('July-20-2018 00:00')]);
Best Answer