Tag: 图的

plot.new()中的错误:图边距太大,散点图

我已经看了不同的问题的解决scheme,我已经尝试了什么build议,但我还没有find一个解决scheme,使其工作。 每次我想运行这个代码,它总是说: plot.new()中的错误:图边距过大 我不知道如何解决这个问题。 这是我的代码: par(mfcol=c(5,3)) hist(RtBio, main="Histograma de Bio Pappel") boxplot(RtBio, main="Diagrama de Caja de Bio Pappel") stem(RtBio) plot(RtBio, main="Gráfica de Dispersión") hist(RtAlsea, main="Histograma de Alsea") boxplot(Alsea, main="Diagrama de caja de Alsea") stem(RtAlsea) plot(RtTelev, main="Gráfica de distribución de Alsea") hist(RtTelev, main="Histograma de Televisa") boxplot(telev, main="Diagrama de Caja de Televisa") stem(Telev) plot(Telev, main="Gráfica de dispersión […]

自动绘制不同的彩色线条

我试图在同一个图上绘制几个内核密度估计,我希望它们都是不同的颜色。 我有一个使用string'rgbcmyk'并逐步通过它每个单独的阴谋kludged解决scheme,但我开始有7个迭代后重复。 有没有更容易/更有效的方法来做到这一点,并有更多的颜色select? for n=1:10 source(n).data=normrnd(rand()*100,abs(rand()*50),100,1); %generate random data end cstring='rgbcmyk'; % color string figure hold on for n=1:length(source) [f,x]=ksdensity(source(n).data); % calculate the distribution plot(x,f,cstring(mod(n,7)+1)) % plot with a different color each time end