绘制太多点? [英] Plotting too many points?

查看:87
本文介绍了绘制太多点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

R(基,格或其他)如何从100000个元素向量(或输出该值的函数)创建图形? 它会密谋一些而拒绝其他吗?密谋全力以赴吗?我该如何改变这种行为?

How does R (base, lattice or whatever) create a graph from a 100000 elements vector (or a function that outputs that values)? Does it plot some and reject others? plot all on top of each other? How can I change this behaviour?

如何创建图表,在每个间隔内都能看到最大值和最小值,就像在交易条形图"中一样? (或其他无需可视化大量信息而无需事先计算自己的时间间隔,最小值和最大值或使用财务信息的想法)

How could I crate a graph where for every interval I see the max and min values, as in the trading "bar" charts? (or any other idea to visualize that much info without needing to previously calculate intervals, mins and maxs myself nor using financial pakages)

如何创建大型水平可滚动"图?

How could I create a large "horizontally scrolleable" plot?

例如,我想绘制前100000次迭代

For example I want to plot the first 100000 iterations

zz <- (zz^2+1) %% nn     

从zz = 1开始,nn = 10 ^ 7 + 1 x轴只是迭代次数.

starting at zz=1, nn = 10^7+1 The x axis would be just the iteration number.

总结.我想绘制一个函数的输出,该函数在很大的时间间隔内有时很软,但有时却很刺眼.峰值很重要.

Summarizing. I want to plot a the output of a function that is sometimes soft but sometimes very spiky, over a very large interval. That spikes are very important.

致谢

推荐答案

您提到您有时会有非常重要的峰值.

You mention tha tyou sometimes have spikes which are vey important.

请参见下文如何绘制ping结果,其中绝大多数数据以毫秒为单位,但是峰值对我来说也很重要:

See below how I plot ping results, where the vast majority of data is in the milliseconds, but the spikes are important for me as well:

基本上,我hexbin所有数据点的响应时间< 500 ms,并为所有更长的响应时间绘制点. 5s响应时间还标记为超时:

Basically, I hexbin all data points with response time < 500 ms, and plot points for all longer response times. 5s response time is additionally marked as timeout:

ggplot (df, aes (x = date, y = t5)) + 
        stat_binhex (data = df [df$t5 <= 0.5,], bins = nrow (df) / 250) +
        geom_point (data = df [df$t5 > 0.5,], aes (col = type), shape = 3) +
        ylim (c (0, 5)) +
        scale_fill_gradient (low = "#AAAAFF", high = "#000080") +
        scale_colour_manual ("response type", 
                             values = c (normal = "black", timeout = "red")) + 
        ylab ("t / s") 

我想我已经将其发布为一个类似问题的解决方案,但找不到.

这篇关于绘制太多点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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