Ask Your Question

eod's profile - activity

2020-09-21 04:28:23 -0600 received badge  Famous Question (source)
2020-05-14 09:36:31 -0600 received badge  Notable Question (source)
2020-04-21 04:20:33 -0600 received badge  Famous Question (source)
2020-04-21 04:20:33 -0600 received badge  Notable Question (source)
2020-04-21 04:20:33 -0600 received badge  Popular Question (source)
2020-04-11 08:00:52 -0600 received badge  Popular Question (source)
2020-02-20 06:50:16 -0600 answered a question Can I make MathJax output centered in the notebook?

I searched for style.min.css in folder where I have Sagemath 9.0 v 0.6.0 installed. I opened the file and removed '!important' from the following line (10967):

div.output_area .MathJax_Display {
  text-align: left !important;
}

The mathjax output is now centered for me.

2020-02-20 06:40:07 -0600 asked a question Can I make MathJax output centered in the notebook?

My problem is the same one described here:

Equations in notebook jump from centered to L aligned upon rendering

and

Centered equations become left aligned if displayed through the markdown display hook

When I use @interact on something that outputs latex in the notebook, the constant jumping to the left is very annoying and distracting.

E.g.:

@interact
   def myfunc(n = slider(1,10)):
   P = matrix([[1,2,n], [2,2,3]])
   show(P)

Is there any way I can control the MathJax rendering in the notebook? Can I perhaps set it to render in the center so I don't have to deal with the jumping?

Thanks

2020-02-20 05:49:44 -0600 commented answer Why doesn't show() render latex properly?

Tried it again the next day and now I can't reproduce the error. No idea what caused it.

2020-02-20 05:46:41 -0600 commented answer Why doesn't show() render latex properly?

I'm not overwriting the variable or anything like that.

2020-02-19 09:21:30 -0600 commented answer Why doesn't show() render latex properly?

For example "matrix([[1,2],[3,4]])" as copied from the sagemath docs.

2020-02-19 08:45:03 -0600 commented answer Why doesn't show() render latex properly?

When I try to use the matrix command I get:

TypeError: 'numpy.ndarray' object is not callable

2020-02-19 08:39:08 -0600 commented answer Why doesn't show() render latex properly?

Hmm, the matrix command gives me an error in jupyter for both sage 8.0 an 9.0 -- but it works in the console. Any idea why?

2020-02-19 06:25:25 -0600 asked a question Why doesn't show() render latex properly?

The following code:

import numpy as np

P = np.matrix('0 0 20 20; 0 20 20 0')

show(P)

Gives me the output

[[𝟶𝟶𝟸𝟶𝟸𝟶]
 [𝟶𝟸𝟶𝟸𝟶𝟶]]

In old sage, I guess around 6.0 or something, the show() command would render a proper latex matrix. I.e like you would see in a mathematics textbook.

Is there any way I can get this functionality back?

Thanks.

Edit: I'm using Sage 9.0 v 0.6.0 on Windows.

2020-02-19 06:14:44 -0600 commented answer "UserWarning: Matplotlib is building the font cache using fc-list." never resolves

Thanks for answering. The latest version of Sage 9 is working for me now though.

2020-01-16 02:43:53 -0600 received badge  Scholar (source)
2020-01-14 02:50:33 -0600 commented question "UserWarning: Matplotlib is building the font cache using fc-list." never resolves

I downgraded to Sage 8.8 and now the plot command works as expected.

2020-01-13 07:12:58 -0600 asked a question How can I get the Sage version 9 on ubuntu?

Hi,

I used 'sudo apt-get install sagemath' in the ubuntu shell to get Sage. However, it installed version 8.1 of Sage.

I would like to install a version of Sage that has automatic syntax highlighting/coloring like version 9 has.

Anyone know how I can do this? I need to do it using the command line only (see below).

-

Some additional context:

I installed sage on ubuntu 18.04 on windows 10 using its Linux bash shell . I'm able to access the Sage running on Ubuntu (on Windows) by going to localhost:8080 on chrome (in Windows).

2020-01-12 09:40:25 -0600 asked a question "UserWarning: Matplotlib is building the font cache using fc-list." never resolves

Hi,

I just downloaded and installed Sage 9.0 on windows. Typing the following:

plot(x^3, (x,0,5))

Gives the following error:

/opt/sagemath-9.0/local/lib/python3.7/site-packages/matplotlib/font_manager.py:281: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
   'Matplotlib is building the font cache using fc-list. '

The kernel is running and nothing happens, even after waiting for a long time.

I did some googling. This stackexchange answer suggesting using

import matplotlib as mpl
print mpl.get_cachedir()

To get the directory of matplotlib, in order to (as suggested here) delete these files:

fontList.cache
fontList.py3k.cache 
tex.cache

I did this, the folder I got was: /home/sage/.sage/matplotlib-1.5.1

But this folder is empty (according to the Sage shell). There are no files to delete there.

Any suggestions for how to get plot to work?

Thanks.

2017-11-23 08:19:33 -0600 received badge  Notable Question (source)
2017-11-23 08:19:33 -0600 received badge  Popular Question (source)
2017-04-11 20:13:07 -0600 received badge  Notable Question (source)
2017-04-11 20:13:07 -0600 received badge  Famous Question (source)
2017-04-11 20:13:07 -0600 received badge  Popular Question (source)
2015-07-06 09:41:20 -0600 asked a question Sagetex on Windows: Using miktex and sage on virtualbox. How to make it work?

Hello!

I've installed sagetex (2009-06-26) using the miktex package manager. I use Sage 6.7 on Oracle's Virtual Box, as recommended for windows users.

For me, the following code:

\documentclass{article}
\usepackage{sagetex}

\begin{document}

For example, there are
$\sage{number_of_partitions(1269)}$
integer partitions of $1269$.

\end{document}

Gives this output:

For example, there are ?? integer partitions of 1269.

All the sage commands just give "??" in the latex document. I've been looking at the documentation, but it doesn't seem to be for windows.

  • Is sagetex supposed to work out of the box, just installing it on miktex and having sage installed on virtualbox?

  • If not, is there an official procedure to make it work? e.g. documentation about sagetex on windows?

Thanks!

2013-11-03 03:30:14 -0600 received badge  Supporter (source)
2013-11-03 02:58:35 -0600 received badge  Student (source)
2013-11-03 02:14:26 -0600 received badge  Editor (source)
2013-11-03 02:13:24 -0600 asked a question Plotting the effects of a linear transformation on a grid

I am a student taking a first undergraduate course in linear algebra, and I would like to play around with plots of transformations of the type $T:\mathbb{R}^2\rightarrow\mathbb{R}^2$. I already know a bit of python, so I'm not looking for anyone to write a program for me, but I would really appreciate some tips/general outline of how to do things.

1) First I want to make a grid that I can plot, and then transform by multiplying it with a matrix. Where's the best way to start? Should I use parametric_plot, or maybe it can be done with just a list of vector([x,y])'s?

2) Second I want to run the grid through a linear transformation. If I could just plot vectors and offset them (not having them start at the origin), I would only only have to iterate over a list of vectors to get the transformed vectors, but I'm not sure if this is a smart way to do it.

Basically, is there a straight forward way to do this? It doesn't seem like it should be very difficult, if someone could give a rough outline of how to do this it would be greatly appreciated.

Thanks.