Skip to content

Add Window method to change axes label format #2006

@9prady9

Description

@9prady9

Originally reported in upstream graphics library, Forge. arrayfire/forge#152

Code used to reproduce the issue.

#include <arrayfire.h>
int main(int argc, char *argv[])
{
    try {
        af::info();
        af::array X = af::seq(0., 0.4, 0.1);
        af::array Y = af::seq(0., 0.9, 0.1);
        af::array Z = af::constant(1., 5, 10);
        af::Window window(1500, 800, "The door.");
        do {
            window.surface(X, Y, Z, "The weird surface");
        } while(!window.close());
    } catch (af::exception& e) {
        fprintf(stderr, "%s\n", e.what());
        throw;
    }
    return 0;
}

Current work around to for the issue is to explicitly set the limits as follows.
window.setAxesLimits(0.0f, 0.4f, 0.0f, 0.9f, -1.0f, 1.0f, true);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions