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

Add function fimagesc #230

Open
sawcordwell opened this issue Jul 22, 2015 · 4 comments
Open

Add function fimagesc #230

sawcordwell opened this issue Jul 22, 2015 · 4 comments

Comments

@sawcordwell
Copy link

Add a function fimagesc that is equivalent to fplot for imagesc. Specifically, let a colormap be generated for a function f that takes two arguments x and y over specified ranges for x and y.

@sawcordwell
Copy link
Author

I have an initial version of this function written which I can post for review if it is deemed useful.
Thanks

@mvkma
Copy link
Collaborator

mvkma commented Jul 23, 2015

I would probably find this very useful.

@sawcordwell
Copy link
Author

I have created a branch for this function https://github.com/sawcordwell/Winston.jl/tree/fimagesc and would like some input. Specifically, what should I do about tests? It seems that not much of Winston is tested, and can it be tested?

Also, fplot uses some algorithm that I haven't looked at in detail yet to create points in some iterative manner. Would that also be a good idea for fimagesc? As a temporary solution I am just using a hard-coded 100 by 100 'resolution'.

@mvkma
Copy link
Collaborator

mvkma commented Jul 29, 2015

Nice, thanks!

I think it would be useful to export the 'resolution' as a parameter in fimagesc.

I also fixed a small bug, where typeof(f(xmin, ymin)) returns Int64, but the following values are not integers, so an InexactError is thrown. This happens for example with the following:

f = (x, y) -> x^2 - y^2
fimagesc(f, (-2, 2), (-2, 2))

I copied your branch (is that the right terminology?) and my changes are now here, if you're interested:
https://github.com/slangangular/Winston.jl/tree/fimagesc

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

2 participants