Ask Your Question

Gro-Tsen's profile - activity

2022-01-26 10:06:16 +0100 received badge  Notable Question (source)
2018-10-02 02:48:10 +0100 received badge  Popular Question (source)
2016-09-18 13:54:52 +0100 received badge  Popular Question (source)
2015-02-26 05:58:49 +0100 received badge  Popular Question (source)
2015-02-26 05:58:49 +0100 received badge  Notable Question (source)
2013-12-26 19:06:55 +0100 asked a question morphism between permutation group and matrix group

I can't figure out how to create a morphism between a permutation group and a matrix group (I know this is possible because Sage uses Gap and Gap doesn't have any problem with this, I don't imagine Sage removed the Gap functionality).

 sage: flip = PermutationGroupElement("(1,2)")
 sage: g = PermutationGroup([flip])
 sage: flop = Matrix(GF(3), 1, 1, [2])
 sage: k = MatrixGroup([flop])
 sage: g.order()
 2
 sage: k.order()
 2
 sage: g.hom([flop])
 <snip useless error message>
 sage: k.hom([flip])
 <snip another useless error message>

How can I construct the homomorphisms from g to k and k to g sending flip to flop and vice versa? (Maybe the problem is that Sage thinks g and k are a "permutation group" and "matrix group" respectively: if so, how can I get the underlying groups?)

2013-11-10 19:19:13 +0100 asked a question How can I determine or control a plot's display scale?

Suppose I do something like

p = plot(sin(x), (x,0,2*pi))
p.save("/tmp/plot.png")

Is there some way of knowing (or even better, controlling) exactly the scale of the saved image in pixels per axis unit (in each direction)?

For example, if I wish to write a second graph to a different png file at exactly the same scale, is there some way to do this?

Or, to put it differently, instead of specifying the size of the output png file in inches using figsize, I wish to specify the size in inches (or pixels) per graph unit.

This matplotlib tutorial seems to be about what interests me, but I don't understand how Sage relates to matplotlib, and how I can access the transData field, let alone control its value.

2012-01-26 16:24:46 +0100 marked best answer How to disable auto-indentation on text mode interface?

I just learned something - it turns out you CAN do this very easily!

sage: def f(x):
....:         return x^2
....: 
sage: %autoindent
Automatic indentation is: OFF
sage: def f(x):
....:     return x^2
....:

See the IPython documentation for more info, including some warnings. I'm not sure exactly what rc files Sage obeys for its own IPython.

2012-01-26 16:24:46 +0100 received badge  Scholar (source)
2012-01-26 16:24:28 +0100 received badge  Supporter (source)
2012-01-26 13:09:31 +0100 received badge  Student (source)
2012-01-25 13:44:36 +0100 asked a question How to disable auto-indentation on text mode interface?

The auto-indentation feature is meant to be friendly, but it actually seriously messes up with copypasting bits of Sage or Python code from text files. Is there some way it can be disabled (ideally: reversibly disabled) so I can copy pre-indented text?