scatter too slow
Mostra commenti meno recenti
Hi, I want to plot particles according to their longitudes, and latitudes and to plot them according to their times (date of birth). That's why I used scatter(lon, lat, 4, time); It works very well for small numbers (10, 20,30,80), but When I use it with bigger numbers (I tried 9 000, and I need in reality 100 000), it's a crash, and I have to stop the process each time.
Does any body have a solution?
Risposte (6)
Sean de Wolski
il 20 Gen 2012
0 voti
Are you sure a 2-dimensional histogram viewed as a mesh or surf wouldn't better suit your needs? I have a lot of trouble believing that you'll be able to depict anything but a blob with 100000 points on most (all) monitors.
If you use a 2-dimensional histogram you'll be able to see how many points are in an area specificed by the size you need. I think this will be much more useful as a visualization/analysis tool.
the cyclist
il 20 Gen 2012
This code executes successfully in about 30 seconds on my machine.
n = 100000;
x = rand(n,1);
y = rand(n,1);
c = rand(n,3);
tic
scatter(x,y,25,c);
toc
Are you embedding any calculations inside your plotting? For example, datenum() can take a notoriously long time to calculate.
Mariem
il 23 Gen 2012
0 voti
3 Commenti
Walter Roberson
il 23 Gen 2012
Which renderer are you using? get(gcf,'Renderer')
If it is OpenGL, then please use the command
opengl info
and look at the 'Software' line of the output. "false" corresponds to "opengl hardware" and "true" corresponds to "opengl hardware" (which would normally be faster.)
Sean de Wolski
il 23 Gen 2012
You're trying to draw 100000pts. Do you really think you'll be able to distinguish between them if they ever do draw?
Mariem
il 24 Gen 2012
Mariem
il 24 Gen 2012
0 voti
1 Commento
Walter Roberson
il 24 Gen 2012
Octave... not many of us here have the experience to talk about what works well or does not work in octave.
per isakson
il 24 Gen 2012
0 voti
In the file exchange there are some contributions, which implement the approach I propose. E.g "plotc" and "Dot plot rather than scatter plot". There are more, but I cannot remember the names.
Mariem
il 24 Gen 2012
0 voti
Categorie
Scopri di più su Graphics Performance in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!