Replies: 3 comments 2 replies
-
OK since I could not figure out the relationship between mark size and axis size and figure size, I decided to render spherical surface of radius R for each XYZ datapoint. I know it'd be heavy load at 100+ points, but this is the best I came with :/
Could you please advice me on this? There is probably a small thing I am missing, it's always like this. void plotParticle (double x, double y, double z, double r) {
auto funx = [r,x](double u, double v) { return r * cos(u) * sin(v)+x; };
auto funy = [r,y](double u, double v) { return r * sin(u) * sin(v)+y; };
auto funz = [r,z](double u, double v) { return r * cos(v)+z; };
auto g1 = matplot::fsurf(funx, funy, funz, {0, 2*matplot::pi, 0, matplot::pi}, "", 10);
//auto g1 = matplot::fmesh(funx, funy, funz, std::array<double, 4>{0, 2 * matplot::pi, 0, matplot::pi});
}
int main() {
double AxLimit = 1000;
auto fig = matplot::figure(false);
fig->size(1000,1000);
auto graph = matplot::gca();
matplot::xlim({0, AxLimit}); matplot::ylim({0, AxLimit}); matplot::zlim({0, AxLimit});
matplot::box(matplot::on); graph->box_full(true);
matplot::hold(matplot::on);
matplot::colormap({{0, 0, 1}});
plotParticle(100,100,100,100);
matplot::colormap({{0, 1, 0}});
plotParticle(500,500,500,200);
matplot::hold(matplot::off);
matplot::show();
return 0;
} |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Yes. The point of circles and marks is to have something that is still circular, and not elliptical, regardless of the ratio, which is quite hard to achieve otherwise. For something elliptical, you have to draw them separately. |
Beta Was this translation helpful? Give feedback.
-
Hi, I've just noticed that circles representing points in 3D scatter change their absolute size according the "situation on the screen".
As I'd like to draw particles of exact size in the plot - is it possible to somehow fix the mark's render size?
I know I have a specific use case, so thanks for the help again.
Beta Was this translation helpful? Give feedback.
All reactions