kivy-garden / graph

Displays plots on a graph.
MIT License
50 stars 18 forks source link

Color in contourplot seems wrong (goldscale?) #17

Closed Louwrensth closed 5 years ago

Louwrensth commented 5 years ago

Problem: I expected the ContourPlot to produce a grayscale image, but I get "gold" scale. It is pretty, but it is not what I need: garden-graph-test

To Reproduce: I simply run the test code in https://github.com/kivy-garden/graph/blob/master/kivy_garden/graph/__init__.py

I don't understand kivy or graph well enough to understand why. I tried to see what happens by tinkering with line 1348:

        buf = np.concatenate((buf, buf, buf), axis=2)

Into (blue):

        buf = np.concatenate((buf*0, buf*0, buf*1), axis=2)

garden-graph-test-blue

Into (green):

        buf = np.concatenate((buf*0, buf*1, buf*0), axis=2)

garden-graph-test-green

Into (red):

        buf = np.concatenate((buf*1, buf*0, buf*0), axis=2)

garden-graph-test-red

So these show that I can make proper red, green and blue, but the sum does not work? Also combinations don't work well (green and blue turns out greenish for instance, not cyan)

Louwrensth commented 5 years ago

Found it.

The testing contour plot is tinted gold in line 1620:

                plot.color = [1, 0.7, 0.2, 1]