Traceback (most recent call last):
File "/app/lib/python3.9/site-packages/plots/plots.py", line 222, in update_shader
attempt(good + bad + unknown)
File "/app/lib/python3.9/site-packages/plots/plots.py", line 217, in attempt
self.gl_area.update_fragment_shader(formulae)
File "/app/lib/python3.9/site-packages/plots/graph.py", line 275, in update_fragment_shader
fragment_shader = shaders.compileShader(
File "/app/lib/python3.9/site-packages/OpenGL/GL/shaders.py", line 235, in compileShader
raise ShaderCompilationError(
OpenGL.GL.shaders.ShaderCompilationError: ('Shader compile failure (0): b"0:94(9): error: `a\' undeclared\\n0:94(9): error: operands to arithmetic operators must be numeric\\n0:94(2): error: `return\' with wrong type error, in function `formula139965471340384\' returning float\\n"', [b'/*\n Copyright 2021 Alexander Huntley\n\n This file is part of Plots.\n\n Plots is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n Plots is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with Plots. If not, see <https://www.gnu.org/licenses/>.\n*/\n\n#version 330 core\nin vec2 graph_pos;\nout vec4 rgba;\n\nuniform vec2 pixel_extent;\nuniform float scale;\nuniform float major_grid;\nuniform float minor_grid;\nuniform float samples;\nuniform float line_thickness;\nuniform vec3 fg_color;\nuniform vec3 bg_color;\n\n#define pi 3.141592653589793\n#define e 2.718281828459045\n\n#define ln(x) log(x)\n#define lg(x) log2(x)\n#define log_base(b, x) (log(x)/log(b))\n#define sec(x) (1.0/cos(x))\n#define csc(x) (1.0/sin(x))\n#define cosec(x) csc(x)\n#define cot(x) (1.0/tan(x))\n#define arcsin(x) asin(x)\n#define arccos(x) acos(x)\n#define arctan(x) atan(x)\n#define asec(x) acos(1.0/(x))\n#define acsc(x) asin(1.0/(x))\n#define acosec(x) acsc(x)\n#define acot(x) (atan(1.0/(x)) - ((x) > 0 ? 0.0 : pi))\n#define arcsec(x) asec(x)\n#define arccsc(x) acsc(x)\n#define arccosec(x) acsc(x)\n#define arccot(x) acot(x)\n#define sech(x) (1.0/cosh(x))\n#define csch(x) (1.0/sinh(x))\n#define cosech(x) csch(x)\n#define coth(x) (1.0/tanh(x))\n#define asech(x) acosh(1.0/(x))\n#define acsch(x) asinh(1.0/(x))\n#define acosech(x) acsch(x)\n#define acoth(x) atanh(1.0/(x))\n#define sgn(x) sign(x)\n#define sinc(x) (sin(x)/(x))\n\nfloat rand(vec2 co){\n // implementation found at: lumina.sourceforge.net/Tutorials/Noise.html\n return 2*fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453) - 1;\n}\n\nfloat zmod(float x, float y) {\n // mod(x,y), but centered on zero\n return mod(x + y/2, y) - y/2;\n}\n\nfloat factorial(float x) {\n float res = 1;\n for (float i = 1; i <= x; i++)\n res *= i;\n return res;\n}\n\nfloat mypow(float x, float y) {\n if (x >= 0)\n return pow(x, y);\n else if (floor(y) == y) {\n return int(y) % 2 == 0 ? pow(-x, y) : -pow(-x, y);\n }\n return 1. / 0.;\n}\n\n\nfloat formula139965471340384(float x) {\n \n return a*x;\n}\n\n\n\n\nvoid main() {\n vec3 color = bg_color;\n vec3 formula_color = vec3(0);\n float sample_extent = line_thickness*pixel_extent.x;\n float step = sample_extent / samples;\n float jitter = .4;\n\n float axis_width = pixel_extent.x;\n vec3 minor_color = mix(fg_color, bg_color, 0.6);\n color = mix(minor_color, color, smoothstep(axis_width*.4, axis_width*.6, abs(zmod(graph_pos.x, minor_grid))));\n color = mix(minor_color, color, smoothstep(axis_width*.4, axis_width*.6, abs(zmod(graph_pos.y, minor_grid))));\n vec3 major_color = mix(fg_color, bg_color, 0.4);\n color = mix(major_color, color, smoothstep(axis_width, axis_width*1.05, abs(zmod(graph_pos.x, major_grid))));\n color = mix(major_color, color, smoothstep(axis_width, axis_width*1.05, abs(zmod(graph_pos.y, major_grid))));\n vec3 axis_color = fg_color;\n color = mix(axis_color, color, smoothstep(axis_width*.6, axis_width*.65, abs(graph_pos.x)));\n color = mix(axis_color, color, smoothstep(axis_width*.6, axis_width*.65, abs(graph_pos.y)));\n\n \n {\n float inside = 0;\nfloat outside = 0;\nfloat prev = 0;\nint monotonic = 0;\nbool nans = false;\nfor (float i = 0.0; i < samples; i++) {\n float ii = i + jitter*rand(vec2(graph_pos.x + i*step, graph_pos.y)) - samples/2;\n float x = graph_pos.x + ii*step;\n float yj = jitter*rand(vec2(graph_pos.y, graph_pos.y + i*step));\n float lower = (-0.5+yj)*sample_extent;\n float upper = (0.5+yj)*sample_extent;\n float fp, f;\n\n f = formula139965471340384(x) - graph_pos.y;\n if (lower < f && f < upper)\n inside += 1.0;\n else\n outside += sign(f);\n fp = prev;\n if (i != 0.0)\n monotonic += int(sign(f - fp));\n prev = f;\n nans = nans || isinf(f) || isnan(f);\n}\nformula_color = vec3(0.5607843399047852,0.9411764740943909,0.6431372761726379);\nif (abs(monotonic) != int(samples) - 3 && !nans) {\n if (inside > 0.0)\n color = mix(color, formula_color, inside/samples);\n if (abs(outside) != samples)\n color = mix(color, formula_color, 1. - abs(outside)/samples);\n}\n }\n \n {\n \n }\n \n\n rgba = vec4(color, 1);\n}'], GL_FRAGMENT_SHADER)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/lib/python3.9/site-packages/plots/plots.py", line 225, in update_shader
attempt(good + unknown)
File "/app/lib/python3.9/site-packages/plots/plots.py", line 217, in attempt
self.gl_area.update_fragment_shader(formulae)
File "/app/lib/python3.9/site-packages/plots/graph.py", line 275, in update_fragment_shader
fragment_shader = shaders.compileShader(
File "/app/lib/python3.9/site-packages/OpenGL/GL/shaders.py", line 235, in compileShader
raise ShaderCompilationError(
OpenGL.GL.shaders.ShaderCompilationError: ('Shader compile failure (0): b"0:94(9): error: `a\' undeclared\\n0:94(9): error: operands to arithmetic operators must be numeric\\n0:94(2): error: `return\' with wrong type error, in function `formula139965471340384\' returning float\\n"', [b'/*\n Copyright 2021 Alexander Huntley\n\n This file is part of Plots.\n\n Plots is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n Plots is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with Plots. If not, see <https://www.gnu.org/licenses/>.\n*/\n\n#version 330 core\nin vec2 graph_pos;\nout vec4 rgba;\n\nuniform vec2 pixel_extent;\nuniform float scale;\nuniform float major_grid;\nuniform float minor_grid;\nuniform float samples;\nuniform float line_thickness;\nuniform vec3 fg_color;\nuniform vec3 bg_color;\n\n#define pi 3.141592653589793\n#define e 2.718281828459045\n\n#define ln(x) log(x)\n#define lg(x) log2(x)\n#define log_base(b, x) (log(x)/log(b))\n#define sec(x) (1.0/cos(x))\n#define csc(x) (1.0/sin(x))\n#define cosec(x) csc(x)\n#define cot(x) (1.0/tan(x))\n#define arcsin(x) asin(x)\n#define arccos(x) acos(x)\n#define arctan(x) atan(x)\n#define asec(x) acos(1.0/(x))\n#define acsc(x) asin(1.0/(x))\n#define acosec(x) acsc(x)\n#define acot(x) (atan(1.0/(x)) - ((x) > 0 ? 0.0 : pi))\n#define arcsec(x) asec(x)\n#define arccsc(x) acsc(x)\n#define arccosec(x) acsc(x)\n#define arccot(x) acot(x)\n#define sech(x) (1.0/cosh(x))\n#define csch(x) (1.0/sinh(x))\n#define cosech(x) csch(x)\n#define coth(x) (1.0/tanh(x))\n#define asech(x) acosh(1.0/(x))\n#define acsch(x) asinh(1.0/(x))\n#define acosech(x) acsch(x)\n#define acoth(x) atanh(1.0/(x))\n#define sgn(x) sign(x)\n#define sinc(x) (sin(x)/(x))\n\nfloat rand(vec2 co){\n // implementation found at: lumina.sourceforge.net/Tutorials/Noise.html\n return 2*fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453) - 1;\n}\n\nfloat zmod(float x, float y) {\n // mod(x,y), but centered on zero\n return mod(x + y/2, y) - y/2;\n}\n\nfloat factorial(float x) {\n float res = 1;\n for (float i = 1; i <= x; i++)\n res *= i;\n return res;\n}\n\nfloat mypow(float x, float y) {\n if (x >= 0)\n return pow(x, y);\n else if (floor(y) == y) {\n return int(y) % 2 == 0 ? pow(-x, y) : -pow(-x, y);\n }\n return 1. / 0.;\n}\n\n\nfloat formula139965471340384(float x) {\n \n return a*x;\n}\n\n\n\n\nvoid main() {\n vec3 color = bg_color;\n vec3 formula_color = vec3(0);\n float sample_extent = line_thickness*pixel_extent.x;\n float step = sample_extent / samples;\n float jitter = .4;\n\n float axis_width = pixel_extent.x;\n vec3 minor_color = mix(fg_color, bg_color, 0.6);\n color = mix(minor_color, color, smoothstep(axis_width*.4, axis_width*.6, abs(zmod(graph_pos.x, minor_grid))));\n color = mix(minor_color, color, smoothstep(axis_width*.4, axis_width*.6, abs(zmod(graph_pos.y, minor_grid))));\n vec3 major_color = mix(fg_color, bg_color, 0.4);\n color = mix(major_color, color, smoothstep(axis_width, axis_width*1.05, abs(zmod(graph_pos.x, major_grid))));\n color = mix(major_color, color, smoothstep(axis_width, axis_width*1.05, abs(zmod(graph_pos.y, major_grid))));\n vec3 axis_color = fg_color;\n color = mix(axis_color, color, smoothstep(axis_width*.6, axis_width*.65, abs(graph_pos.x)));\n color = mix(axis_color, color, smoothstep(axis_width*.6, axis_width*.65, abs(graph_pos.y)));\n\n \n {\n float inside = 0;\nfloat outside = 0;\nfloat prev = 0;\nint monotonic = 0;\nbool nans = false;\nfor (float i = 0.0; i < samples; i++) {\n float ii = i + jitter*rand(vec2(graph_pos.x + i*step, graph_pos.y)) - samples/2;\n float x = graph_pos.x + ii*step;\n float yj = jitter*rand(vec2(graph_pos.y, graph_pos.y + i*step));\n float lower = (-0.5+yj)*sample_extent;\n float upper = (0.5+yj)*sample_extent;\n float fp, f;\n\n f = formula139965471340384(x) - graph_pos.y;\n if (lower < f && f < upper)\n inside += 1.0;\n else\n outside += sign(f);\n fp = prev;\n if (i != 0.0)\n monotonic += int(sign(f - fp));\n prev = f;\n nans = nans || isinf(f) || isnan(f);\n}\nformula_color = vec3(0.5607843399047852,0.9411764740943909,0.6431372761726379);\nif (abs(monotonic) != int(samples) - 3 && !nans) {\n if (inside > 0.0)\n color = mix(color, formula_color, inside/samples);\n if (abs(outside) != samples)\n color = mix(color, formula_color, 1. - abs(outside)/samples);\n}\n }\n \n {\n \n }\n \n\n rgba = vec4(color, 1);\n}'], GL_FRAGMENT_SHADER)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/lib/python3.9/site-packages/plots/formularow.py", line 283, in delete
self.app.update_shader()
File "/app/lib/python3.9/site-packages/plots/plots.py", line 227, in update_shader
attempt(good)
File "/app/lib/python3.9/site-packages/plots/plots.py", line 217, in attempt
self.gl_area.update_fragment_shader(formulae)
File "/app/lib/python3.9/site-packages/plots/graph.py", line 275, in update_fragment_shader
fragment_shader = shaders.compileShader(
File "/app/lib/python3.9/site-packages/OpenGL/GL/shaders.py", line 235, in compileShader
raise ShaderCompilationError(
OpenGL.GL.shaders.ShaderCompilationError: ('Shader compile failure (0): b"0:94(9): error: `a\' undeclared\\n0:94(9): error: operands to arithmetic operators must be numeric\\n0:94(2): error: `return\' with wrong type error, in function `formula139965471340384\' returning float\\n"', [b'/*\n Copyright 2021 Alexander Huntley\n\n This file is part of Plots.\n\n Plots is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n Plots is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with Plots. If not, see <https://www.gnu.org/licenses/>.\n*/\n\n#version 330 core\nin vec2 graph_pos;\nout vec4 rgba;\n\nuniform vec2 pixel_extent;\nuniform float scale;\nuniform float major_grid;\nuniform float minor_grid;\nuniform float samples;\nuniform float line_thickness;\nuniform vec3 fg_color;\nuniform vec3 bg_color;\n\n#define pi 3.141592653589793\n#define e 2.718281828459045\n\n#define ln(x) log(x)\n#define lg(x) log2(x)\n#define log_base(b, x) (log(x)/log(b))\n#define sec(x) (1.0/cos(x))\n#define csc(x) (1.0/sin(x))\n#define cosec(x) csc(x)\n#define cot(x) (1.0/tan(x))\n#define arcsin(x) asin(x)\n#define arccos(x) acos(x)\n#define arctan(x) atan(x)\n#define asec(x) acos(1.0/(x))\n#define acsc(x) asin(1.0/(x))\n#define acosec(x) acsc(x)\n#define acot(x) (atan(1.0/(x)) - ((x) > 0 ? 0.0 : pi))\n#define arcsec(x) asec(x)\n#define arccsc(x) acsc(x)\n#define arccosec(x) acsc(x)\n#define arccot(x) acot(x)\n#define sech(x) (1.0/cosh(x))\n#define csch(x) (1.0/sinh(x))\n#define cosech(x) csch(x)\n#define coth(x) (1.0/tanh(x))\n#define asech(x) acosh(1.0/(x))\n#define acsch(x) asinh(1.0/(x))\n#define acosech(x) acsch(x)\n#define acoth(x) atanh(1.0/(x))\n#define sgn(x) sign(x)\n#define sinc(x) (sin(x)/(x))\n\nfloat rand(vec2 co){\n // implementation found at: lumina.sourceforge.net/Tutorials/Noise.html\n return 2*fract(sin(dot(co.xy ,vec2(12.9898,78.233))) * 43758.5453) - 1;\n}\n\nfloat zmod(float x, float y) {\n // mod(x,y), but centered on zero\n return mod(x + y/2, y) - y/2;\n}\n\nfloat factorial(float x) {\n float res = 1;\n for (float i = 1; i <= x; i++)\n res *= i;\n return res;\n}\n\nfloat mypow(float x, float y) {\n if (x >= 0)\n return pow(x, y);\n else if (floor(y) == y) {\n return int(y) % 2 == 0 ? pow(-x, y) : -pow(-x, y);\n }\n return 1. / 0.;\n}\n\n\nfloat formula139965471340384(float x) {\n \n return a*x;\n}\n\n\n\n\nvoid main() {\n vec3 color = bg_color;\n vec3 formula_color = vec3(0);\n float sample_extent = line_thickness*pixel_extent.x;\n float step = sample_extent / samples;\n float jitter = .4;\n\n float axis_width = pixel_extent.x;\n vec3 minor_color = mix(fg_color, bg_color, 0.6);\n color = mix(minor_color, color, smoothstep(axis_width*.4, axis_width*.6, abs(zmod(graph_pos.x, minor_grid))));\n color = mix(minor_color, color, smoothstep(axis_width*.4, axis_width*.6, abs(zmod(graph_pos.y, minor_grid))));\n vec3 major_color = mix(fg_color, bg_color, 0.4);\n color = mix(major_color, color, smoothstep(axis_width, axis_width*1.05, abs(zmod(graph_pos.x, major_grid))));\n color = mix(major_color, color, smoothstep(axis_width, axis_width*1.05, abs(zmod(graph_pos.y, major_grid))));\n vec3 axis_color = fg_color;\n color = mix(axis_color, color, smoothstep(axis_width*.6, axis_width*.65, abs(graph_pos.x)));\n color = mix(axis_color, color, smoothstep(axis_width*.6, axis_width*.65, abs(graph_pos.y)));\n\n \n {\n float inside = 0;\nfloat outside = 0;\nfloat prev = 0;\nint monotonic = 0;\nbool nans = false;\nfor (float i = 0.0; i < samples; i++) {\n float ii = i + jitter*rand(vec2(graph_pos.x + i*step, graph_pos.y)) - samples/2;\n float x = graph_pos.x + ii*step;\n float yj = jitter*rand(vec2(graph_pos.y, graph_pos.y + i*step));\n float lower = (-0.5+yj)*sample_extent;\n float upper = (0.5+yj)*sample_extent;\n float fp, f;\n\n f = formula139965471340384(x) - graph_pos.y;\n if (lower < f && f < upper)\n inside += 1.0;\n else\n outside += sign(f);\n fp = prev;\n if (i != 0.0)\n monotonic += int(sign(f - fp));\n prev = f;\n nans = nans || isinf(f) || isnan(f);\n}\nformula_color = vec3(0.5607843399047852,0.9411764740943909,0.6431372761726379);\nif (abs(monotonic) != int(samples) - 3 && !nans) {\n if (inside > 0.0)\n color = mix(color, formula_color, inside/samples);\n if (abs(outside) != samples)\n color = mix(color, formula_color, 1. - abs(outside)/samples);\n}\n }\n \n {\n \n }\n \n\n rgba = vec4(color, 1);\n}'], GL_FRAGMENT_SHADER)