Strange surface plot

Open
#152 7 comments 0 reactions 1 assignee View on GitHub

@9prady9 is already working on this.

Since Nov 22, 2017.

Assessment

This issue has not been assessed yet.

Description

bug

Hi, on my machine, the surface plot seems to have multiple issues. If I run the following code:

#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;
}

I see the following image (without the red lines):
surface

The image has a few problems:

  1. The Y-axis labels are all the same.
  2. The X-axis labels are probably all the same as well.
  3. The surface is plotted in wrong position and probably scaled badly (hard to say).

System version:

ArrayFire v3.6.0 (OpenCL, 64-bit Linux, build default)
[0] INTEL: Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz, 15930 MB
Linux pine 4.13.11-1-ARCH #1 SMP PREEMPT Thu Nov 2 10:25:56 CET 2017 x86_64 GNU/Linux
Both Forge from devel branch and from arrayfire behave the same, CPU backend as well.

Also when I resize the window, the program crashes with:

Failed to blit
[1]    788 segmentation fault (core dumped)  ./a.out

Thank you for your help and for a nice high-performance visualization tool!

Dominant language
C++
Stars
238
Forks
46
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arrayfire/forge

All issues in arrayfire/forge

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.