ginga icon indicating copy to clipboard operation
ginga copied to clipboard

How do I figure out the canvas.add commands?

Open jhennawi opened this issue 6 years ago • 2 comments

Hi All,

Every time I try to figure out the documentation for one of the canvas.add options using the RC functionality, I can neither find documentation, nor figure out what to do via the normal tricks in python. I think the issue is that in ipython for example

canvas.add?

does not provide any useful information. I'm trying to see what options I can pass to path, and don't know how to find this documentation without grepping around in the source code.

Thanks! Joe Hennawi

jhennawi avatar Nov 23 '18 08:11 jhennawi

Hi Joe, Sorry for the state of the documentation. The add() command can add any of the shape types that are defined under ginga.canvas.types. The good part is that if you go to that directory in the ginga source tree (ginga/canvas/types) and browse the source, you will find a parameter description table at the beginning of each type definition, describing each parameter in the type and what it is for. Most of the standard geometric types are in basic and there are specialized ones in utils, astro and layer. Looking at the classes will also tell you which parameters are positional and which are keyword.

ejeschke avatar Nov 24 '18 14:11 ejeschke

Thanks this is very helpful. Much appreciated!!

On Sat, Nov 24, 2018 at 06:10 ejeschke [email protected] wrote:

Hi Joe, Sorry for the state of the documentation. The add() command can add any of the shape types that are defined under ginga.canvas.types. The good part is that if you go to that directory in the ginga source tree (ginga/canvas/types) and browse the source, you will find a parameter description table at the beginning of each type definition, describing each parameter in the type and what it is for. Most of the standard geometric types are in basic and there are specialized ones in utils, astro and layer. Looking at the classes will also tell you which parameters are positional and which are keyword.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ejeschke/ginga/issues/720#issuecomment-441370568, or mute the thread https://github.com/notifications/unsubscribe-auth/AIXjo2Y_rOsgOiSK1wgpn0oTgDDsrn0Gks5uyVM8gaJpZM4YwR-W .

--

Joseph F. Hennawi Associate Professor Department of Physics Broida Hall, UC Santa Barbara Santa Barbara, CA 93106-9530 Phone: 805-893-3503 Mobile: 805-450-8697 E-mail: joe@ [email protected]physics.ucsb.edu http://web.physics.ucsb.edu/~joe/ enigma.physics.ucsb.edu

jhennawi avatar Nov 24 '18 21:11 jhennawi