我如何生成ASCII“图形输出”?从R? [英] How can I generate ascii "graphical output" from R?

查看:101
本文介绍了我如何生成ASCII“图形输出”?从R?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我相信R可以使用软件包。当前,它包括散点图,折线图,密度图,acf和条形图。



从在线帮助中,

 > txtplot(汽车[,1],汽车[,2])
+ ---- + ------------ ++ ------------ + ----------- + ------------ +-+
120 + * +
| |
100 + +
| * * |
80 + * * +
| * * * |
60 + * * +
| * * * * * |
40 + * * * * * +
| * * * * * * * |
20 + * * * * * * * +
| * * * * |
| * * * |
0 + ---- + ------------ + ------------ + ----------- +- ----------- +-+
5 10 15 20 25


I believe R can generate stem-and-leaf for ascii histograms, and scatter plots using this code from Matt Shotwell.

Can it also generate ASCII based line graphs, like this from GNUPlot?

解决方案

You should look at the fairly recent txtplot package. Currently, it includes scatterplot, line plot, density plot, acf, and bar chart.

From the online help,

> txtplot(cars[,1], cars[,2])
    +----+------------+------------+-----------+------------+--+
120 +                                                     *    +
    |                                                          |
100 +                                                          +
    |                                                     * *  |
 80 +                           *         *                    +
    |                                        *       *    *    |
 60 +                           *              *               +
    |                              *    * *    *       *       |
 40 +                         *      *  * *  *                 +
    |                 *       * *    *  *    * *               |
 20 +         *       *  * *  * *  *                           +
    |            *    *  * *                                   |
    |  *      *    *                                           |
  0 +----+------------+------------+-----------+------------+--+
         5           10           15          20           25   

这篇关于我如何生成ASCII“图形输出”?从R?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆