Skip to content

Commit

Permalink
Added gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
mwshinn committed May 16, 2021
1 parent a7b586f commit 8c4c9f2
Show file tree
Hide file tree
Showing 10 changed files with 1,116 additions and 5 deletions.
5 changes: 2 additions & 3 deletions cand/canvas.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ def convert_to_absolute_coord(self, point):
return Point(point.x*self.size[0], point.y*self.size[1], "absolute")
if point.coordinate == "-absolute":
return Point(self.size[0]-point.x, self.size[1]-point.y, "absolute")
if point.coordinate in ["Msize", "fontsize"]: # Msize for backward compatibility
return self.convert_to_absolute_coord(Point(point.x*self.fontsize, point.y*self.fontsize, "point"))
if point.coordinate in self.axes.keys():
# The call to autoscale_view fix the problem that automatic data
# limits are updated lazily, and thus, gives an outdated transData
Expand Down Expand Up @@ -588,9 +590,6 @@ def add_legend(self, pos_tl, els, fontsize=None, line_spacing=Height(2.2, "Msize
assert len(els) >= 1
# Get the text height
fprops = self._get_font()
t = matplotlib.textpath.TextPath((0,0), "M", size=fontsize, prop=fprops)
if self.is_valid_identifier("Msize"):
self.add_unit("Msize", Vector(self.fontsize, self.fontsize, "point"))
# All params are in units of M width or height
padding_top = Height(0, "Msize") # Space on top of figure
padding_left = Width(0, "Msize") # Space on left of lines
Expand Down
Binary file added doc/_static/images/ddmdiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/images/fokkerplanck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8c4c9f2

Please sign in to comment.