Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Surface plot with extreme amount of data

Subject: Surface plot with extreme amount of data

From: Borda

Date: 29 Apr, 2013 09:00:14

Message: 1 of 3

Hello Guys!
I would like to make a surface plot. I've got x,y and z coordinates of a certain area measured near my city. The problem is that I've got over 1.7 million measurement points...
I tried to use to usual method (create X,Y,Z matrices with meshgrid and the use surface), but not so surprisingly the matlab gave me an error, that the memomy is exceeded or something like that.
What I'm planning to do, is dividing the meassurement points into groups of like 10000 points and try to plot them one after the other on the same figure, so that at the and, like a mosaic it would give me the whole surface.
Is it possible to do this somehow? I mean not the division into groups, but to plot on the same surface, without the previous data would be erased or overwritten?

Subject: Surface plot with extreme amount of data

From: Yehonatan

Date: 29 Apr, 2013 12:09:10

Message: 2 of 3

Hello Borda,
For starters it's possible, when you create the figure you can add:
'hold on'and it will hold on the figure any data you plotted and will plot.
I must warn you that it's not a good idea. Just like you tried in the first time, matlab will have to save all of your data and shortly will be out of memory just like the first time.
I have a solution for you, In my free time i created a special function for 3d plotting. It's not yet complete but it can solve your problem. I created a special option for large amount of data. If you would choose so, you can send me the data, i will use it and i will return you the result surface.

Best regards...

Subject: Surface plot with extreme amount of data

From: matt dash

Date: 29 Apr, 2013 15:29:10

Message: 3 of 3

"Borda" wrote in message <kllcqu$h5b$1@newscl01ah.mathworks.com>...
> Hello Guys!
> I would like to make a surface plot. I've got x,y and z coordinates of a certain area measured near my city. The problem is that I've got over 1.7 million measurement points...
> I tried to use to usual method (create X,Y,Z matrices with meshgrid and the use surface), but not so surprisingly the matlab gave me an error, that the memomy is exceeded or something like that.
> What I'm planning to do, is dividing the meassurement points into groups of like 10000 points and try to plot them one after the other on the same figure, so that at the and, like a mosaic it would give me the whole surface.
> Is it possible to do this somehow? I mean not the division into groups, but to plot on the same surface, without the previous data would be erased or overwritten?

There is no point in using that much data to plot a surface. The resolution of your monitor isn't high enough to distinguish between a surface with 1.7 million points and one with ~50,000. Try downsampling your data first and then plotting the surface.

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us