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

sampling_vertex_vw doesn't work as expected #1175

Closed
IKupriyanov-HORIS opened this issue Sep 9, 2024 · 1 comment
Closed

sampling_vertex_vw doesn't work as expected #1175

IKupriyanov-HORIS opened this issue Sep 9, 2024 · 1 comment
Assignees

Comments

@IKupriyanov-HORIS
Copy link
Collaborator

The quality of the resulting geometries is unacceptably bad:

from lets_plot import *
LetsPlot.setup_html()

def f(x, y, n):
    z = np.sin(x * 3 * np.pi / n)
    z += np.sin(y * 3 * np.pi / n)
    z += x * 3 / n
    z += y * 5 / n
    return z

n = 50
x = np.arange(n)
y = np.arange(n)
X, Y = np.meshgrid(x, y)
Z = f(X, Y, n)
data = dict(
    x=X.reshape(-1),
    y=Y.reshape(-1),
    z=Z.reshape(-1))

p = ggplot(data, aes('x','y', z='z')) \
    + theme_void() + ggsize(200, 200)
p + geom_contour(sampling=sampling_vertex_vw(100))

image

@IKupriyanov-HORIS IKupriyanov-HORIS self-assigned this Sep 9, 2024
IKupriyanov-HORIS added a commit that referenced this issue Sep 9, 2024
Fix:
#1168 - Unable to display or save graph when using geom_path
#1174 - Vertex sampling uses different tolerances for objects within the same plot
#1175 - sampling_vertex_vw doesn't work as expected
#1176 - sampling_vertex_dp may break rings
@IKupriyanov-HORIS
Copy link
Collaborator Author

IKupriyanov-HORIS commented Sep 9, 2024

Fixed via 80fcbf2

image

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

1 participant