graph.tk icon indicating copy to clipboard operation
graph.tk copied to clipboard

how to draw a piecewise function in graph.tk

Open chixg opened this issue 13 years ago • 6 comments

seems piecewise function is not supported yet , have a plan ?

chixg avatar Feb 26 '12 09:02 chixg

Nope. How would something like

"y = (x>3) ? x : x^2" be? That would translate to ----/ x, if x>3 y=-\ x^2

aantthony avatar Feb 26 '12 09:02 aantthony

example:

y =
x ( x > =0 )
-x ( x < 0 )

chixg avatar Feb 26 '12 09:02 chixg

how to use "if" ? copy "x, if x>3 y=-\ x^2 " only "-\ x^2" works

chixg avatar Feb 26 '12 09:02 chixg

What works?

Also, I think another way to specify it could be:

"y = x \and x>3 \union y=x^2 \and x <= 3"

aantthony avatar Feb 26 '12 09:02 aantthony

Sorry , I still can't catch your idea..

when copy "y = x \and x>3 \union y=x^2 \and x <= 3" to http://graph.tk/ console, "Too many '='s" is the result.

any help doc is available ?

chixg avatar Feb 26 '12 10:02 chixg

Oh. When I said "y = x \and x>3 \union y=x^2 \and x <= 3" I was speculating that in the future that could be a possible way to use such a feature. Piecewise functions are not supported yet, so it is not possible now.

There are no help docs yet.

aantthony avatar Feb 26 '12 11:02 aantthony