Ask Your Question
1

How to plot a set of points?

asked 2018-09-22 12:26:45 +0200

-christopher- gravatar image

Hello,

how can I plot an interval like [0,1] ?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-09-25 03:05:51 +0200

dazedANDconfused gravatar image

updated 2018-09-25 03:13:51 +0200

The documentation for Sage plotting in 2 dimensions is here. From your description, I think you are talking about region_plot(). Here's an example:

x,y = var('x,y')
region_plot([x^2 + y < 1, x < y], (x,-2,2), (y,-2,2))

The region plotted consists of the points satisfying both inequalities (intersection), where x is in the interval [-2,2] and y is in the interval [-2,2].

edit flag offensive delete link more

Comments

Thank you for your answer :)

-christopher- gravatar image-christopher- ( 2018-09-27 11:47:57 +0200 )edit
0

answered 2018-09-23 18:05:15 +0200

tmonteil gravatar image

I am not sure about your question, but you can do:

 sage: line2d([(0,0),(1,0)], xmin=-2, xmax=2, thickness=2)
edit flag offensive delete link more

Comments

sorry I have not described my question good enough. I'm looking for something like: plot all points (x,y) for which x is in interval A and y is interval B. I would like to define a set of Points (x,y) by some rules, maybe do some set operations like intersection on it, and finally plot it.

-christopher- gravatar image-christopher- ( 2018-09-23 18:23:57 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2018-09-22 12:26:45 +0200

Seen: 342 times

Last updated: Sep 25 '18