Ask Your Question

Cheng's profile - activity

2021-06-09 07:21:31 +0200 marked best answer Where can I find documentation for matplotlib()?

I was trying to implement the code in the answer post by ADuC812 in combine sage plot with matplotlib. The poster used called matplotlib(), however, I could not find this method anywhere.

Essentially,

g=plot(sin(x))
from matplotlib.figure import Figure
figure = Figure()
main_plot = figure.add_axes((0.2,0.2,0.7,0.7))
g.matplotlib('a.svg', figure=figure, sub=main_plot)

Is matplotlib() supposed to be part of sagemath or matplotlib? Would you provide a link to the documentation for it? Thanks in advance!

Edit: Found this: Get list of coordinates from plot object

And trying:

var('x,y')
p = implicit_plot(x^2+y^2-1,(x,-2,2),(y,-2,2),plot_points=4)
P = p.matplotlib()
type(P)

I get

<class 'matplotlib.figure.Figure'>
2021-06-09 04:51:28 +0200 edited question Where can I find documentation for matplotlib()?

Where can I find documentation for matplotlib()? I was trying to implement the code in the answer post by ADuC812 in com

2021-06-09 04:44:55 +0200 edited question Where can I find documentation for matplotlib()?

Where can I find documentation for matplotlib()? I was trying to implement the code in the answer post by ADuC812 in com

2021-06-09 04:14:02 +0200 edited question Where can I find documentation for matplotlib()?

Where can I find documentation for matplotlib()? I was trying to implement the code in the answer post by ADuC812 in com

2021-06-09 04:13:27 +0200 edited question Where can I find documentation for matplotlib()?

Where can I find documentation for matplotlib()? I was trying to implement the code in the answer post by ADuC812 in com

2021-06-09 04:12:05 +0200 asked a question Where can I find documentation for matplotlib()?

Where can I find documentation for matplotlib()? I was trying to implement the code in this post by ADuC812 in combine s

2021-06-08 13:40:55 +0200 commented answer combine sage plot with matplotlib

It's quite unfortunate that this trac is still not finished... Any updates?

2021-06-08 01:12:12 +0200 commented answer combine sage plot with matplotlib

It's quite unfortunate that this trac is still not finished...

2021-06-08 01:08:17 +0200 commented answer combine sage plot with matplotlib

It's quite unfortunate that it's still not finished...

2021-05-25 10:09:30 +0200 commented answer Any SageMath Electromagnetism resources?

Actually, I was interested in materials for introductory electromagnetism .... But sure.

2021-05-22 14:27:06 +0200 received badge  Editor (source)
2021-05-22 14:27:06 +0200 edited question Any SageMath Electromagnetism resources?

Any SageMath Electromagnetism resources? Recently, I came across the article "SAGE off Stage: Teaching Electromagnetics

2021-05-22 14:16:59 +0200 asked a question Any SageMath Electromagnetism resources?

Any SageMath Electromagnetism resources? Recently, I came across the article "SAGE off Stage: Teaching Electromagnetics

2021-05-20 06:19:26 +0200 commented answer Change of variable in an integration

@kcrisman is this in the sage library already?

2021-05-10 12:09:44 +0200 received badge  Supporter (source)
2021-05-08 11:35:04 +0200 marked best answer Error using matplotlib gallery examples in SageMath verbatim

I am interested in the double pendulum problem from the matplotlib gallery.

After pasting the source code into the Jupyter notebook, this error occurred:

TypeError Traceback (most recent call last)

<ipython-input-1-fcbcf0dba74b> in <module>
     72 time_template = 'time = %.1fs'
     73 time_text = ax.text(RealNumber('0.05'), RealNumber('0.9'), '', transform=ax.transAxes)
---> 74 history_x, history_y = deque(maxlen=history_len), deque(maxlen=history_len)
     75 
     76 

TypeError: an integer is required

Does anyone know how to fix this?

2021-05-08 11:35:04 +0200 received badge  Scholar (source)
2021-05-08 11:01:36 +0200 received badge  Student (source)
2021-05-08 10:54:56 +0200 asked a question Error using matplotlib gallery examples in SageMath verbatim

Using mathplotlib gallery examples in Sagemath i am interested in the double pendulum problem from Mathplotlib Gallery a