0
考虑到this question,我试图用两个独立的plot使用坐标轴而不是plotyy来解决问题,该坐标不能与'boxplot'和'plot ':绘制两个不同的图(y轴),在matlab中共享相同的x
%%% definition of my x=y line axes
y2 = 1:6;
x2 = 1:6;
% Plot the first data set using boxplot, that results in 6 boxes
load carsmall;
boxplot(MPG,Origin)
% Get the axes and configure it
ax1 = gca;
set(ax1,'XColor','r','YColor','r')
%Create the new axes
ax2 = axes('Position',get(ax1,'Position'),...
'XAxisLocation','top',...
'YAxisLocation','right',...
'Color','none',...
'XColor','k','YColor','k');
% Plot the second data set with the new axes
hl2 =plot(x2,y2,'Color','k','parent',ax2);
但仍然没有得到我的最后阴谋正确的方式。有谁知道为什么?
请张贴可执行代码。 (什么是box_panda_8?) – thewaywewalk
@thewaywewalk,请看现在更新的问题;) – Amir