• Stars
    star
    257
  • Rank 158,728 (Top 4 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created almost 8 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

easy drawing in jupyter

egal

easy SVG drawing in jupyter and elsewhere...

Example

Instructions

Click on the "brush" icon in the jupyter toolbar to create an SVG cell below the current selection.

Labels and Latex

To change the label of a shape, double-click on it and type. Hit enter to finish. To use latex, start and finish the label with $$ as in $$\sum_i i$$.

Animation

The egal canvas shows/overlays a window of frames. This window is specified by the two numbers between the left and right arrow icons. The left number is the first frame included in the window, the right number the last frame. Each object (circles, boxes, freestyle shapes etc.) is associated with its own frame window which appears on the right when selecting the object. An object is rendered on the egal canvas when the egal frame window overlaps with the object frame window.

Using this setup, to generate an animate build-in sequence you can:

  • set the window of the first object to appear to (1,100)
  • set the window of the second object to appear to (2,100)
  • etc.

To click through the animation, set the egal window to (1,1). Then click on the right arrow which will move the frame window to (2,2), and so on. It will look something like this:

Features

egal's focus is on drawing simple graphs:

  • Basic Shapes (circles, rectangles, lines)
  • Freestyle Drawing
  • Connectors
  • Labels, with support for Latex
  • Alignment hints when dragging and resizing
  • Multiple Selection
  • Animation (Build-in & Build-out)
  • Copy & Paste

How Does it Work?

egal creates a raw jupyter cell and stores the edited SVG in the source code field of that cell.

Installation

Get the Python Package

Manually by cloning and changing the python path:

git clone https://github.com/uclmr/egal.git
cd egal
export PYTHONPATH=. 

or (experimental) install python package directly:

pip3 install git+https://github.com/uclmr/egal.git

Install and Enable Extension

jupyter nbextension install --py egal 
jupyter nbextension enable --py egal 

Optional: Server Extension

If you want to use egal outside of a notebook you need to install the server extensions (which allows clients to save the SVG on the jupyter server):

jupyter serverextension enable --py egal 

Then you can edit an SVG on the server via accessing http://localhost:8888/files/draw.html (assuming you run jupyter notebook locally).

More Repositories

1

stat-nlp-book

Interactive Lecture Notes, Slides and Exercises for Statistical NLP
Jupyter Notebook
269
star
2

jack

Jack the Reader
Python
257
star
3

torch-imle

Implicit MLE: Backpropagating Through Discrete Exponential Family Distributions
Python
257
star
4

emoji2vec

emoji2vec: Learning Emoji Representations from their Description
Jupyter Notebook
257
star
5

fakenewschallenge

UCL Machine Reading - FNC-1 Submission
Python
166
star
6

pycodesuggest

Learning to Auto-Complete using RNN Language Models
Python
156
star
7

cqd

Continuous Query Decomposition for Complex Query Answering in Incomplete Knowledge Graphs
Python
95
star
8

ntp

End-to-End Differentiable Proving
NewLisp
88
star
9

d4

Differentiable Forth Interpreter
Python
66
star
10

low-rank-logic

Code for Injecting Logical Background Knowledge into Embeddings for Relation Extraction
Scala
65
star
11

inferbeddings

Injecting Background Knowledge in Neural Models via Adversarial Set Regularisation
Python
59
star
12

gntp

Python
57
star
13

ctp

Conditional Theorem Proving
Python
51
star
14

EMAT

Efficient Memory-Augmented Transformers
Python
34
star
15

stat-nlp-book-scala

Interactive book on Statistical NLP
Scala
32
star
16

simpleNumericalFactChecker

Fact checker for simple claims about statistical properties
Python
26
star
17

adversarial-nli

Code and data for the CoNLL 2018 paper "Adversarially Regularising Neural NLI Models to Integrate Logical Background Knowledge."
Python
25
star
18

acl2015tutorial

Moro files for the ACL 2015 Tutorial on Matrix and Tensor Factorization Methods for Natural Language Processing
Scala
20
star
19

numerate-language-models

Python
19
star
20

fever

FEVER Workshop Shared-Task
Python
16
star
21

APE

Adaptive Passage Encoder for Open-domain Question Answering
Python
15
star
22

stat-nlp-course

Code for the UCL Statistical NLP course
Scala
11
star
23

newshack

BBC Newshack code
Scala
1
star
24

eqa-tools

Tools for Exam Question Answering
Python
1
star
25

softconf-start-sync

Softconf START sync, tool for Google Sheets
JavaScript
1
star
26

bibtex

BibTeX files
TeX
1
star