简体   繁体   English

从PerformanceAnalytics包中保存图表对象

[英]Save chart object from performanceanalytics package

Is it possible to save the chart object from the performanceanalytics package into an object like one can do with the ggplot2 or lattice chart? 是否可以像把ggplot2lattice那样将图表对象从performanceanalytics包中保存到一个对象中?

For example this snail trail chart . 例如, 此蜗牛追踪图表

The short answer is no. 最简洁的答案是不。

If you look at the source code of chart.SnailTrail , you can see that it uses basic plotting functionality (eg plot.new() , points() , segments() , text() , axis() , title() , legend() ). 如果您查看chart.SnailTrail的源代码,您会发现它使用了基本的绘图功能(例如plot.new()points()segments()text()axis()title()legend() )。

Of course you could rewrite the function with ggplot2 functions instead. 当然,您可以ggplot2函数重写该函数。 If you do so, I suggest making the new function available as an answer to your question, in your own package or in the PerformanceAnalytics package. 如果这样做,建议您在您自己的程序包或PerformanceAnalytics程序包中将新功能用作对问题的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM