Plot (Big)

版本 1.6.0.0 (25.9 KB) 作者: Tucker McClure
Makes MATLAB's line plots much faster.
5.4K 次下载
更新时间 2018/5/16

编者注: This file was selected as MATLAB Central Pick of the Week

This simple tool intercepts data going into a plot and reduces it to the smallest possible set that looks identical given the number of pixels available on the screen. It then updates the data as a user zooms or pans. This is useful when a user must plot a very large amount of data and explore it visually.
This works with MATLAB's built-in line plot functions, allowing the functionality of those to be preserved.
Instead of:

plot(t, x);

One could use:

reduce_plot(t, x);

Most plot options, such as multiple series and line properties, can be passed in too, such that 'reduce_plot' is largely a drop-in replacement for 'plot'.

h = reduce_plot(t, x(1, :), 'b:', t, x(2, :), t, x(3, :), 'r--*');

This function works on plots where the "x" data is always increasing, which is the most common, such as for time series.

For more information, see:

>> help LinePlotReducer

or

>> help reduce_plot

引用格式

Tucker McClure (2024). Plot (Big) (https://github.com/tuckermcclure/matlab-plot-big), GitHub. 检索来源 .

MATLAB 版本兼容性
创建方式 R2012b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Line Plots 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

无法下载基于 GitHub 默认分支的版本

版本 已发布 发行说明
1.6.0.0

Now manages its memory better when figures or axes are reused (with thanks to Jack).

1.4.0.0

Added support for the new graphics system in R2014b.

1.3.0.0

Added ability to have multiple LinePlotReducers in a single axes object. Note: this is for convenience; it's fastest to use a single LinePlotReducer for all lines in the axes.

1.2.0.0

Now allows inputs as combination of rows and columns, like the built-in plot functions. For instance, these all do the same thing:

x = 1:10;
y = [1:10; 2:11];
reduce_plot(x, y);
reduce_plot(x.', y);
reduce_plot(x, y.');
reduce_plot(x.', y.');

1.1.0.0

Fixed a bug when "taking over" a plot with only a single line. Fixed a bug that caused the final line spec in a series to be ignored.

1.0.0.0

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库