Hi, please help, problems using SageMath 8.1 Console to plot!

asked 2018-02-19 03:40:28 -0600

maria_exe gravatar image

Hi, I am using SageMath 8.1 Console on Windows 10. First time I try to plot something I get an error: "/opt/sagemath-8.1/local/lib/python2.7/site-packages/sage/repl/rich_output/display_manager.py:590: RichReprWarning: Exception in _rich_repr_ while displaying object: 'ascii' codec can't decode byte 0xc4 in position 12: ordinal not in range(128) RichReprWarning, Graphics object consisting of 1 graphics primitive." And when I repeat the code to plot sage returns "Graphics object consisting of 1 graphics primitive" and it does not show anything i.e. it does not plot a thing. Im getting a bit hopeless here beacuse it seems like sage is running the code properly (beacuse it is a simple plot) but it does not want to show the result image for some reason. Please help! The code to plot I was using is: x=var('x') plot(x+2, (x,0,5))

edit retag flag offensive close merge delete

Comments

To display inline code, like z = x*y, use backticks.

To display blocks of code or error messages, skip a line above and below, and do one of the following (all give the same result):

  • indent all code lines with 4 spaces
  • select all code lines and click the "code" button (the icon with '101 010')
  • select all code lines and hit ctrl-K

For instance, typing

If we define `f` by

    def f(x, y):
        return (x, y)

then `f(2, 3)` returns `(2, 3)` but `f(2)` gives:

    TypeError: f() takes exactly 2 arguments (1 given)

produces:

If we define f by

def f(x, y):
    return (x, y)

then f(2, 3) returns (2, 3) but f(2) gives:

TypeError: f() takes exactly 2 arguments (1 given)

Please edit your question to do that.

slelievre gravatar imageslelievre ( 2018-02-19 20:40:11 -0600 )edit