-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extra grid space around high aspect data #431
Comments
Any progress on this issue? I've been facing the same problem, where manually setting the bound of the grind doesn't seem to change it |
I get your point. I believe that grid should always have squares on themself to have consistency in each axis. Grid in k3d have two types of lines - for minorScale and majorScale (that looks visually good). majorScale/minorScale = 10 (always) Right now K3D force a grid to have a least size of 2 majorScale in each axis. for your code:
So:
I can change: Results will be like that: Do you feel that this is a better solution? @marcinofulus @GiudiceVitor |
I feel my point is a bit different: I have a 128x128x128 cube, and I would like to see just that (or have the power to manually change the grid bounds), but it always shows up to 180 in every direction: So far, I've been trying to set the grid bound, by setting Maybe i'm missing something? OBS: Btw, great library! Thanks! |
I understand with your comment that the grid is forced to have at least 2 majorScales on each axis (in my case the major scale is 100). I feel like maybe if I manually change the bound argument, the majorScale should be rescaled to half the bound (for example, 64 in my case), so it is still visually pleasing, but in conformity with my manual bounds. Does it feel like a good solution? |
Extra grid space around high aspect data #431
Hi @GiudiceVitor, I know that new solution will not met with all yours needs but I'm feeling that we have good progress (left is previous view, right a new one [on devel branch]): I changed extending grid to nearest minorThick. I also changed way of calculating position of labels on grid |
So I would like to change a scope of your issue to what is above. Please check a new version that I will release soon. If that will be still a issue for you please add another issue for tweaking it also |
Hi! Please check https://pypi.org/project/k3d/2.16.1/ :) |
Works fine by me! Thanks :) |
Thanks for your feedback! |
Description
When plotting data that covers a high aspect ratio volume in x,y,z, the grid has extra space around the data.
I would like the grid to conform to the volume's bounds specified by the
bounds
kwarg, or allow manual control, so that the visualization of the data is comprehensible to the viewer.What I Did
Here is a minimal example that exhibits the problem.
data
has shape similar to my data. The bounds of the data have an aspect ratio similar to that of the data cube I'm working with (astronomical spectral data cube: right ascension, declination, frequency). By inspection, I believe the data displayed in the plot axes (the "grid") has the span in x,y,z as specified.If I try to explicitly change the plot axes limits by doing
I get the same result, which seems wrong. I expected this to work somewhat like
matplotlib
or any number of other plotting libraries, where directly specifying axes limits was possible. I understand that there may be some default behavior for the grid size to be different than what is specified for "aesthetic reasons," but not being able to override this is frustrating, and the result is aesthetically worse.I have tried every combination of
plot()
argsgrid_auto_fit
,grid=[x0, y0, z0, x1, y1, z1]
,volume()
argsbounds
, andscaling
I can think of, and the above is my best result.Web console log / python logs
N/A
Thanks for making this library! The volume rendering results and speed are great, I'd just like to know how to have a little more control over it.
The text was updated successfully, but these errors were encountered: