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, 21 Feb 2021 15:48:44 +0100How to change the gridlines dimension?https://ask.sagemath.org/question/55797/how-to-change-the-gridlines-dimension/ plot(f, (x, 0.1, 1), figsize= 4, color= 'green', gridlines =True)
I want to use the change the default gridline spacing!
And add a proper box at the all the 4 edges of the Plot.
Could someone help ?
Thankskrrish0150Sun, 21 Feb 2021 15:48:44 +0100https://ask.sagemath.org/question/55797/Can I scatter plot shaded grids?https://ask.sagemath.org/question/31240/can-i-scatter-plot-shaded-grids/I would like to make a scatter plot, much like those in blog.zacharyabel.com/2012/06/putting-the-why-in-wythoff/ and blog.zacharyabel.com/2012/04/wythoffs-game-red-or-blue/ regarding Wythoff's Game. Right now my best approximation is using scatter_plot and gridlines='minor', but it's not quite what I'm looking for. Does anyone know if it's possible in Sage?ctennenhTue, 01 Dec 2015 14:57:45 +0100https://ask.sagemath.org/question/31240/plot grids in a figurehttps://ask.sagemath.org/question/10779/plot-grids-in-a-figure/Dear all,
I want to plot grids in my plot.
I couldn't find any keyword like 'grid' in the help document of 'plot()' <function sage.plot.plot.plot>, and hence I tried [NUMERICAL PLOTTING](http://www.sagemath.org/doc/reference/plotting/sage/plot/plot.html):
sage: from pylab import *
sage: t = arange(0.0, 2.0, 0.01)
sage: s = sin(2*pi*t)
sage: P = plot(t, s, linewidth=1.0)
sage: xl = xlabel('time (s)')
sage: yl = ylabel('voltage (mV)')
sage: t = title('About as simple as it gets, folks')
sage: grid(True)
sage: savefig(os.path.join(SAGE_TMP, 'sage.png'))
sage: P
[<matplotlib.lines.Line2D at 0x7e0a050>] # stored in RAM?
but nothing came out... OK, how can I check if SAGE can call Matplotlib in my OS (openSuSE 12.3) correctly? I have installed and updated 'matplotlib' for Python 2.7 via YaST2.
Thanks in advance!gundamlhTue, 26 Nov 2013 10:40:36 +0100https://ask.sagemath.org/question/10779/Solid lines in plot and grid lineshttps://ask.sagemath.org/question/9244/solid-lines-in-plot-and-grid-lines/I have a plot which sweeps over a range shown below and the plots it on a log scale on the horizontal axis (I am using 5.2 so the log scale feature is present).
1. However, rather than points, I would like to see a solid line and,
2. Some grid lines on both the horizontal and vertical axis at the tick points.
3. Is there also a way to control the range on the vertical axis?
Here is the entire formulation. The range on the y-axis I would like to see labeled is from -5 to -25. I asked a question before using the formulation below but the scale did not was off due to the wrong operator being used so I did not ask that particular question at the time:
z1=2 * pi * 650 * 10^6
p1=2 * pi * 1.9 * 10^9
p2=2 * pi * 5 * 10^9
adc=.667
deltaF=.2 * 10^9
N=(adc * p1 * p2)/z1
M(freq)=(-2 * i * pi * freq + z1)/((-2 * i * pi * freq+p1) * (-2 * i * pi * freq+p2))
g(frq)=20 * abs(log(N * M(frq),10))
pts=[(frq,g(frq).n()) for frq in srange(10^8,10^11,deltaF)]
list_plot(pts, scale='semilogx')gjmThu, 16 Aug 2012 11:42:11 +0200https://ask.sagemath.org/question/9244/