Ask Your Question

elcardin's profile - activity

2021-04-13 01:19:59 +0200 received badge  Nice Answer (source)
2021-04-10 10:07:02 +0200 received badge  Self-Learner (source)
2021-04-10 10:07:02 +0200 received badge  Teacher (source)
2021-04-10 03:26:03 +0200 answered a question How to load .sobj files into Jupyter Notebook

I believe the issue was with where the file was saving. I'm not sure why I couldn't just direct to where it was saving b

2021-04-10 03:23:50 +0200 commented question How to load .sobj files into Jupyter Notebook

I don't know, I didn't try it in the terminal.

2021-03-23 20:28:22 +0200 commented answer Strange list_plot artifact?

Thank you! I'm not sure why this fixed it, but it did!

2021-03-23 20:27:56 +0200 marked best answer Strange list_plot artifact?

I am creating and using a list of complex numbers, and I want to plot them on the plane. This has so far been simple. However, when using two different codes to do the same thing, I'm coming up with two different pictures. Unfortunately, the simpler code is giving me the incorrect graphic.

I have my list roots, and it has all my points in a list of lists. (I prefer to keep these lists separate as they denote different types of points I'm looking at.)

When I used the code:

allroots=[]
for period in roots:
    for i in period:
        allroots.append(i)
pic=list_plot([m for m in allroots])

my graphics come out exactly as desired. However, when I use the following code:

plot = sum(list_plot(i) for i in roots)

which is clearly the simpler code, the picture has changed to show points that are not in my list. For example, my list does not have the point 1, (which I have checked multiple times because that would break math) and yet this simpler code consistently plots a point at 1, as well as a few other seemingly random points.

Can anyone explain what's happening or give a better code to use? I'd really like to plot my list of lists without having to compile them into a single list, but this code is causing me problems, and I have no idea why.

2021-03-23 06:00:29 +0200 asked a question How to load .sobj files into Jupyter Notebook

How to load .sobj files into Jupyter Notebook Hello! I am medium-new with Sage, and I'm trying to figure out how best to

2021-03-23 05:42:09 +0200 asked a question Strange list_plot artifact?

Strange list_plot artifact? I am creating and using a list of complex numbers, and I want to plot them on the plane. Thi

2021-03-20 03:07:47 +0200 received badge  Supporter (source)
2021-03-20 03:07:44 +0200 marked best answer Automatically adding colors to multiple list_plot graphics

Is there a way to automatically color different plots?

For example, I'm trying to plot complex points using list_plot, and the points are all stored in a list of lists, each of which I would like to be a different color. So, in order to plot these points, I have

list=[list1,list2,...]
plot = sum(list_plot(i) for i in list)

I'm wondering if there's any (somewhat simple) way to add different colors corresponding to each list in an iterable fashion, rather than typing out

plot=list_plot([i for i in list1], rgbcolor='red')+list_plot([i for i in list2], rgbcolor='orange')+...
2021-03-20 03:07:44 +0200 received badge  Scholar (source)
2021-03-19 02:49:25 +0200 received badge  Student (source)
2021-03-19 02:34:55 +0200 asked a question Automatically adding colors to multiple list_plot graphics

Automatically adding colors to multiple list_plot graphics Is there a way to automatically color different plots? For e