Skip to content
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

Improve visualization of StreamObject #111

Open
Tracked by #73
wkearn opened this issue Dec 10, 2024 · 1 comment
Open
Tracked by #73

Improve visualization of StreamObject #111

wkearn opened this issue Dec 10, 2024 · 1 comment
Labels
enhancement New feature or request visualization

Comments

@wkearn
Copy link
Contributor

wkearn commented Dec 10, 2024

The current plotting method for StreamObject converts it to a binary GridObject and plots that. It works, but for larger DEMs, it gets very hard to see because every stream is a single pixel wide. The MATLAB STREAMobj.plot method splits the stream network into line segments and plots those segments. This is probably what we should do, but it does require a slightly complicated traversal of the stream network.

@wkearn wkearn changed the title Improve visualization of StreamObject with DEM overlays. Improve visualization of StreamObject Dec 10, 2024
@wschwanghart
Copy link

Most functions to plot STREAMobjs use the function STREAMobj2XY. The function converts some data along the stream network into a nan-punctuated vector. Unfortunately, the name of the function is somewhat misleading and non-findable, but I found out only after I had written it that it is very useful for a number of tasks. That being said, I guess it might be useful to have such a function in Python as well.

Note also that there are other functions that plot STREAMobjs with variable line colors (see plotc or plotdz with the option 'color' set to some vector). I don't know whether matplotlib can plot lines with colors that change along the line (it seems it can). If not, then it might be good to have some similar approach as in splitbyattribute and num2rgb.

@wkearn wkearn added visualization enhancement New feature or request labels Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request visualization
Projects
None yet
Development

No branches or pull requests

2 participants