我正在AESRD 2013 - SCO Bitumen - 7y.csv 这个文件夹中生成一个ggplot2线图.该文件根据我的意愿在网站上自动创建.这些是显示一些生产值的几个时间序列,每个生产值根据"编译"列命名.所以我根据"编译"分组.
plotter.r在同一文件夹中可用的文件中查看我的代码摘录(参见上文).
# "dt" is the dataframe derived from the csv file.
# "thinned" is some vector of x-values that tells where to draw the special symbols.
p = ggplot(dt, aes(Date, Value, colour= Compilation, group = Compilation, size = plotParameter), guide=FALSE)
p = p + geom_point(data=dt[thinned,],aes(as.Date(Date), Value, colour= Compilation, shape = Compilation), size = 5)
p = p + scale_shape_manual(values = seq(0,20))
p = p + geom_line(guide = FALSE)
p …Run Code Online (Sandbox Code Playgroud) 这不是关于说明(文档就足够了),而是关于事情如何运作的问题。
Symfony 4 的自动装配系统允许我们通过简单的类型提示自动注入服务
use App\Util\Rot13Transformer;
class TwitterClient
{
public function __construct(Rot13Transformer $transformer)
{
$this->transformer = $transformer;
}
}
Run Code Online (Sandbox Code Playgroud)
为了更深入地了解 PHP,我查看了 symfony-bundle 源代码,但找不到“魔法”发生的地方。
Symfony 如何防止 PHP 抗议没有足够的参数提供给构造函数(或任何使用自动装配的函数)?