Ask Your Question

c05772's profile - activity

2022-12-13 21:25:58 +0200 commented answer How to output from sage

This is out of date, see here, may be you will get an updated way to do that...

2022-12-13 21:14:07 +0200 edited question How to output from sage (update)

How to output from sage (update) This question was answered there 12 years ago. I was using the code from ccanonc

2022-12-13 21:00:45 +0200 asked a question How to output from sage (update)

How to output from sage (update) This question was answered there 12 years ago. I was using the code from ccanonc

2021-11-08 10:16:20 +0200 received badge  Notable Question (source)
2021-09-22 17:52:27 +0200 received badge  Enthusiast
2021-09-21 21:48:47 +0200 received badge  Commentator
2021-09-21 21:48:47 +0200 commented answer Marker color not consistent

I also though it could be a bug but it is so easy to claim a bug when you fail to get your result that I let someone mor

2021-09-20 13:32:36 +0200 received badge  Nice Question (source)
2021-09-20 00:31:45 +0200 asked a question Marker color not consistent

Marker color not consistent I have a simple plot with a legend in different colors. The result will be correct or incorr

2021-05-31 18:11:00 +0200 received badge  Notable Question (source)
2021-05-31 18:11:00 +0200 received badge  Popular Question (source)
2020-07-26 02:48:15 +0200 received badge  Popular Question (source)
2020-07-04 22:22:19 +0200 received badge  Famous Question (source)
2019-11-15 02:46:19 +0200 received badge  Notable Question (source)
2019-03-26 21:15:14 +0200 commented answer in command mode plot3d not displaying - only says "Graphics3d Object"

I think this answers the question (I tried the command

sage 'sphere((0, 0, 0), 1).save(filename="foo.png", viewer="tachyon")'

which works fine in the test program, no -c option), but of course it does solve not the problem which was to be able to export the Graphics3d object. At least it avoids spending hours looking a non-existing solution.

In a general way it is a weakness because the 3D jmol cannot be exported from the Windows version with jupyter either (cf. [https://ask.sagemath.org/question/392...] ) The only work around I see is to run the file twice, once in the terminal and cut and paste it i the browser of the virtual machine, run it and export the jmol figure from there with a right click.

2019-03-26 16:19:38 +0200 commented question in command mode plot3d not displaying - only says "Graphics3d Object"

No, I tried the three viewers, jmol, tachyon and threejs.

2019-03-25 23:32:26 +0200 asked a question in command mode plot3d not displaying - only says "Graphics3d Object"
  • I use sagemath in a virtual machine (osboxes.org). To get a text copy of the output, and some latex and TikZ code it is convenient for me to use a linux terminal and launching something like

    /home/osboxes/SageMath/./sage /FilesSage/GSphereShowTest.sage | tee /FilesSage/GSphereShowTestOutput.txt

    the problem is I do not have a 3dplot: the terminal only states "Graphics3d Object".

  • To simplify I tried just

    /home/osboxes/SageMath/./sage /FilesSage/GSphereShowTest.sage

    to no avail.

  • There is already a question with a similar problem (plot3d not displaying - only says "Graphics3d Object"?!) but the solution does not apply. Here there is no max min.

The same test works without any problem with a sage terminal

The test code is just:

G=sphere((0,0,0),1)
show(G, viewer='jmol')
print 'say Hello'``

What should be done to get access to the viewer in a linux terminal?

2019-01-06 22:15:05 +0200 received badge  Supporter (source)
2018-11-30 09:47:40 +0200 received badge  Nice Answer (source)
2018-11-08 00:21:06 +0200 commented question admin password

This is the right answer, PROVIDED that you have only ONE process running, if you have more than one kill or close the other one(s).

2018-09-06 20:04:09 +0200 received badge  Famous Question (source)
2018-08-22 19:35:39 +0200 received badge  Popular Question (source)
2018-03-11 15:57:42 +0200 received badge  Notable Question (source)
2018-03-03 21:09:24 +0200 commented answer sagemath windows 8.1 launching jupyter from another directory or drive

I wrote a global solution below combining your solution with mine for the drive problem. I hope it is OK like that. Thanks

2018-03-03 21:05:28 +0200 received badge  Scholar (source)
2018-03-03 19:20:54 +0200 commented answer sagemath windows 8.1 launching jupyter from another directory or drive

After trying multiple solutions, it seems that, in Windows, this solution works ONLY for directories below the C:\Users\UserName directory. It means if you want to start in the Documents directory of "UserName" you have to modify line 195 of the jupyter_notebook_config.py file with

c.NotebookApp.notebook_dir = u'\Documents'

the u is not necessary, you get the same result with

c.NotebookApp.notebook_dir = '\Documents'

and the fact that you can only use relative notation for the Documents directory confirms it.

Note also that you have to use the Windows backslash not the linux slash for the directory name.

2018-03-03 01:10:38 +0200 commented answer 'launched jmol viewer for Graphics3d Object' fails

Tani's script is a "great unusable" solution.I wonder if another work around would not be to have sage export directly the necessary file(s) in the working directory so that a vizualisation with a pure windows jmol installation could work (or even the sagemath installation which could be accessed directly through a .bat file).

For now, I found on internet and I tried: SaveJmolFigure = tmp_filename(ext=".jmol") G.export_jmol('/cygdrive/e/User/SaveJmolFigure.jmol') but it fails.

2018-03-02 20:27:02 +0200 commented answer Sagemath 8.1 windows: Impossible to export jmol figure from Jupyter while it works with former notebook.

Yes but what is surprising is that the export is working with the old notebook() format: same kernel, same windows installation, same shortcut. And by the way this remark may help to find why jupyter is not fully working.

2018-03-02 20:22:32 +0200 commented question Sagemath 8.1 windows: Impossible to export jmol figure from Jupyter while it works with former notebook.

The kernel in both cases in SageMath 8.1, don't forget that this is the windows edition and the program is launched through the standard windows shortcut created at installation time.

2018-03-02 17:59:15 +0200 received badge  Editor (source)
2018-03-02 15:22:27 +0200 received badge  Teacher (source)
2018-03-02 15:22:27 +0200 received badge  Self-Learner (source)
2018-03-02 02:06:36 +0200 commented answer sagemath windows 8.1 launching jupyter from another directory or drive

For a directory this is OK but for a drive?

2018-03-02 01:22:28 +0200 answered a question sagemath windows 8.1 launching jupyter from another directory or drive

I have the following work around. I launch the SageMath shell from the Windows shortcut.

Then to start from E:\username, I type

(sage-sh)> cd /cygdrive/e/username and then (sage-sh)> jupyter notebook

It is quick but not as fast as the "SageMath 8.1 Notebook" shortcut directly installed by the software.


Experimenting again, I found this "hybrid Linux Windows" solution for the drive problem. I give the full solution for Windows below grouping John Palmieri answer (above) and mine for the user "UserName" willing to have the root directory of jupyter on drive E:, directory E:\UserName\Maths:

  1. After installing SageMath 8.1 click on the shortcut "SageMath 8.1 Shell"

  2. In this shell, execute the instruction :

    sage -n jupyter --generate-config
    
  3. It will generate the message:

    Writing default config to: /dot_sage/jupyter-4.1/jupyter_notebook_config.py
    

    Note that in a windows installation (with OS on the C: drive), this directory is in fact

    C:\Users\UserName.sagemath-8.1\jupyter-4.1

  4. Edit the file C:\Users\UserName.sagemath-8.1\jupyter-4.1\jupyter_notebook_config.py, replacing the line

#c.NotebookApp.notebook_dir = u''

(This line is numbered 195 in my editor, it is a standard default file, it should be the same in yours) with

     c.NotebookApp.notebook_dir = '/cygdrive\e\UserName\Maths'

Note the slashes orientation, you start in Linux mode and finsh in Windows !! This is NOT a typo.

  1. Save the file and click the shortcut "SageMath 8.1 Notebook". Jupyter should have E:\UserName\Maths as root directory.
2018-03-02 01:17:09 +0200 asked a question sagemath windows 8.1 launching jupyter from another directory or drive

After installing sagemath 8.1 for windows, I try to launch jupyter from drive E:\ where the data are, instead of C:\ which is a SSD. It is not possible once in the browser to switch to another disk as reported in various places on internet.

What is the best work around?

2018-03-02 01:02:30 +0200 asked a question Sagemath 8.1 windows: Impossible to export jmol figure from Jupyter while it works with former notebook.

After installing sagemath 8.1 for windows I try to save as a jmol file a 3D figure and as shown on the figure that I cannot upload :-( [I do not have the 60 points required, a figure is worth a thousand words, too bad!].

So I load 2 shells: one running "jupyter notebook", the other running "notebook()" in both shell I try the MWE:

G=sphere((0,0,0),1)
show(G,figsize=(5,5),title="Sample Figure",aspect_ratio=1);

On both, I right click on the jmol figure,then on File, in both cases 'File->' becomes red but only in the old notebook() I get the sub menu (Load Save Export) and the subsubmenus. With jupyter, I get nothing and cannot export.

Worse even in a console, I cannot get the jmol figure executed, neither exported.

I jumped to 61 points overnight, so here is the picture:image description

2018-01-16 03:07:31 +0200 received badge  Popular Question (source)
2017-12-26 22:15:34 +0200 received badge  Good Question (source)
2017-12-01 14:42:56 +0200 received badge  Nice Question (source)
2017-10-27 18:39:19 +0200 received badge  Student (source)
2017-10-27 02:01:38 +0200 answered a question sagemath 8.0 for windows notebook does not start

For now a work around is the following:

from windows menu start the sagemath 8.0 console. At the sage: prompt type sage: cd "E:\document\User" /cygdrive/e/document/User/ sage: notebook()

Note that the command "cd" (as "pwd" and some others) can be used directly at the console but not in a .sage or .py file

2017-10-27 02:01:38 +0200 asked a question sagemath 8.0 for windows notebook does not start

Testing Sagemath 8.0 for Windows: the notebook shortcut launches the browser (albeit with a sagemath.ico not found message) giving the official windows user directory on the C: drive and I could not find a way to change the working disk. I would like to launch it on my real user directory which is on another drive (E:). Moreover the server does not start even after a logout-login process with the console given token.

2017-10-27 02:01:38 +0200 answered a question launching sagemath notebook() on a different drive.

For now a work around is the following:

from windows menu start the sagemath 8.0 console. At the sage: prompt type sage: cd "E:\document\User" /cygdrive/e/document/User/ sage: notebook()

Note that the command "cd" (as "pwd" and some others can be used directly at the console but not in a .sage or .py file

2017-10-27 02:01:38 +0200 asked a question launching sagemath notebook() on a different drive.

Testing Sagemath 8.0 for Windows: the notebook shortcut launches the browser (albeit with a sagemath.ico not found message) giving the official windows user directory on the C: drive and I could not find a way to change the working disk. I would like to launch it on my real user directory which is on another drive. Moreover the server does not start even after a logout-login process with the console given token.

2017-10-27 02:01:38 +0200 asked a question 'launched jmol viewer for Graphics3d Object' fails

Testing Sagemath for windows 8.0 with jmol, I get the message at the console but nothing happens. However the jmol viewer (launched with jmol.bat) found in C:\Program Files\SageMath 8.0\runtime\opt\sagemath-8.0\local\share\jmol is working correctly.

> sage: G=sphere((0,0,0),1) 
> sage: show(G,figsize=(5,5),title="Sample Figure",aspect_ratio=1); 
> Launched jmol viewer for Graphics3d Object  
> sage:

It looks like a path problem but I don't see how to modify it.