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

Allow tripcolor to directly plot triangle-centered functions #811

Closed
imsejae opened this issue Apr 3, 2012 · 2 comments
Closed

Allow tripcolor to directly plot triangle-centered functions #811

imsejae opened this issue Apr 3, 2012 · 2 comments
Assignees

Comments

@imsejae
Copy link

imsejae commented Apr 3, 2012

To the best of my knowledge, the current version of tripcolor (and by extension tricontour and tricontourf) requires a function call of the following form:

             tripcolor(x,y,triangles,z)

where "z" is a vector that is of the same length as "x" and "y". In other words, "z" represents a function that lives at the nodes of the triangular mesh. Then, when the function is actually plotted, a color value is assigned to the triangle in the mesh by arithmetically averaging the values on the 3 nodes that make up the current triangle.

If one is plotting a function that is truly node-centered, this is probably fine. However, if one has an element-based function, it would be much preferable if tripcolor would allow an input "z" that is of the length of "triangles" rather than "x" and "y". Then the color value for the triangle can directly come from "z" instead of from arithmetically averaging of node values.

@mdboom
Copy link
Member

mdboom commented Apr 13, 2012

@ianthomas23: As the original author of tripcolor, do you have any thoughts?

@ghost ghost assigned ianthomas23 Apr 17, 2012
@ianthomas23
Copy link
Member

This sounds useful, and shouldn't take me long to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants