Forgot password
 Register account
View 1295|Reply 2

剔除数据

[Copy link]

17

Threads

24

Posts

0

Reputation

Show all posts

opuikl_0 posted 2017-5-24 00:06 |Read mode
现在有10000×2的数据,第一列是横坐标的值(x=1,2,3,...),间隔为1,第二列是纵坐标,范围是[0,2.5]
根据这10000个点坐标画散点图,效果如下:
1.png

可这样点太密了,想要的效果是像下面这样的:
2.png

我猜他没有用全部10000个点去画,可能是取的横坐标间隔比较大,所以我想剔除部分数据试试.....请问什么办法可以剔除数组中的数据使得只保留横坐标为1, 101, 201, 301,...的点?

谢谢!

673

Threads

110K

Posts

218

Reputation

Show all posts

kuing posted 2017-5-24 00:16
不用删,仅抽取部分来画就好了,比如说
ListLinePlot[Table[data[[100 k]], {k, 1, 100}], AspectRatio -> 1/2, PlotRange -> {{0, 10000}, {0, 2.5}}]
就是抽取100k的

17

Threads

24

Posts

0

Reputation

Show all posts

original poster opuikl_0 posted 2017-5-24 02:13
回复 2# kuing

好机智,多谢!

Quick Reply

Advanced Mode
B Color Image Link Quote Code Smilies
You have to log in before you can reply Login | Register account

$\LaTeX$ formula tutorial

Mobile version

2025-7-20 06:23 GMT+8

Powered by Discuz!

Processed in 0.013324 seconds, 25 queries