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

Problems with arguments - Rdatasets example not work well. #27

Open
kojix2 opened this issue Jun 3, 2020 · 2 comments
Open

Problems with arguments - Rdatasets example not work well. #27

kojix2 opened this issue Jun 3, 2020 · 2 comments

Comments

@kojix2
Copy link
Member

kojix2 commented Jun 3, 2020

This is not a problem with rdatasets.

Rather, it is a problem with format_xyzc method.

def format_xyzc(*args)

When you pass 2d ruby array as Z to methods like contour contourf, it will not work as expected.

contourf(Z)     # z is 2d ruby array or 2d numo array.
contourf(X,Y,Z) # x, y, z are 1d ruby array or 1d numo array.

This issue is complicated because sometimes these methods get multiple series.

contourf([Z,Z,Z])
contourf([[X,Y,Z],[X,Y,Z],[X,Y,Z]])

It is impossible to distinguish contourf([[X,Y,Z],[X,Y,Z],[X,Y,Z]]) from contourf(Z).
Maybe I have to reconsider APIs...

@kojix2
Copy link
Member Author

kojix2 commented Aug 31, 2020

To better understand the problem, I need to list the types of arguments for each function...

@kojix2 kojix2 changed the title The Rdatasets example not work well. Problems with arguments - Rdatasets example not work well. Sep 5, 2021
@kojix2
Copy link
Member Author

kojix2 commented Sep 17, 2021

To better understand this problem, we need to break Example down into smaller pieces and make it more like a unit test.

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