ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 04 Dec 2022 06:27:05 +0100How to adjust the size of graphs in `graphs_list.show_graphs`https://ask.sagemath.org/question/65204/how-to-adjust-the-size-of-graphs-in-graphs_listshow_graphs/The following code is used to find some cospectral graphs. I want to show it in pairs with a for-loop. But each line of the **graphs looks too small** and there is **too much space** between each pair of graphs. I want to show them in a beautiful way.
g=graphs.cospectral_graphs(6)
l=len(g)
for i in range(l):
print("The",i+1, "th pair cospectral graphs")
graphs_list.show_graphs(g[i],vertex_size=200,figsize=100,vertex_labels=True,vertex_color='orange')
![image description](/upfiles/1670131551893866.png)
I tried another method. I put a frame around each graph (like the blue border above). But the frame for each graph is not is inconsistent (see in the following picture). (The reason for putting a frame around each graph is to better distinguish the different graphs)
g=graphs.cospectral_graphs(6)
l=len(g)
for i in range(l):
G=[plot(g[i][j],graph_border=True,edge_thickness=2, vertex_size=200,vertex_labels=True,vertex_color='orange') for j in range(len(g[i]))]
print("The",i+1, "th pair cospectral graphs:")
graphics_array(G).show(figsize=5)
![image description](/upfiles/1670134545666748.png)lichengSun, 04 Dec 2022 06:27:05 +0100https://ask.sagemath.org/question/65204/Choose figsize for 3D plotshttps://ask.sagemath.org/question/61568/choose-figsize-for-3d-plots/Apparently the option figsize does not work in 3D.
sage: var('x, y')
sage: W = plot3d(x^2 + y^2, (x, -2, 2), (y, -2, 2))
sage: show(W, figsize=6)
Any suggestions?gpiresMon, 21 Mar 2022 19:39:14 +0100https://ask.sagemath.org/question/61568/Height of the output cell in 3D plotshttps://ask.sagemath.org/question/60188/height-of-the-output-cell-in-3d-plots/Is it possible to change the height of the output cell in 3d plots?
We can globally change the size of 2D plots with
Graphics().SHOW_OPTIONS.update({'figsize':[6,4]})
Is there something similar for 3d plots?cav_rtFri, 10 Dec 2021 02:07:40 +0100https://ask.sagemath.org/question/60188/contour_plot and figsize issuehttps://ask.sagemath.org/question/8567/contour_plot-and-figsize-issue/Hello!
I am trying to make contour_plot of function and then get result image with custom size using **show** and keywork **figsize**.
The strange thing: this code actually ignores **figsize** keyword:
x,y = var('x,y')
contour_plot(cos(x^2+y^2), (x, -4, 4), (y, -4, 4)).show(xmin=-4,xmax=4,ymin=-4,ymax=4,figsize=(10,6))
But this one respects:
(point((0,0))+contour_plot(cos(x^2+y^2), (x, -4, 4), (y, -4, 4))).show(xmin=-4,xmax=4,ymin=-4,ymax=4,figsize=(8,2))
How to set figsize for contour_plot properly?EugeneFri, 16 Dec 2011 08:26:56 +0100https://ask.sagemath.org/question/8567/