Skip to content

Commit

Permalink
[fix] Propagate uniform_space down to WireframeView
Browse files Browse the repository at this point in the history
Fixes gh-9
  • Loading branch information
njsmith committed Nov 13, 2015
1 parent 5864fac commit 63708f7
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions viscm/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,8 @@ def __init__(self, uniform_space="CAM02-UCS",
min_Jp=15, max_Jp=95, xp=None, yp=None):
from .bezierbuilder import BezierModel, BezierBuilder

self._uniform_space = uniform_space

axes = _viscm_editor_axes()

ax_btn_wireframe = plt.axes([0.7, 0.15, 0.1, 0.025])
Expand Down Expand Up @@ -523,7 +525,8 @@ def plot_3d_gamut(self, event):
fig, ax = plt.subplots(subplot_kw=dict(projection='3d'))
self.wireframe_view = WireframeView(ax,
self.cmap_model,
self.highlight_point_model)
self.highlight_point_model,
self._uniform_space)
plt.show()

def save_colormap(self, event):
Expand Down Expand Up @@ -770,7 +773,7 @@ def _refresh(self):


class WireframeView(object):
def __init__(self, ax, cmap_model, highlight_point_model):
def __init__(self, ax, cmap_model, highlight_point_model, uniform_space):
self.ax = ax
self.cmap_model = cmap_model
self.highlight_point_model = highlight_point_model
Expand All @@ -782,7 +785,7 @@ def __init__(self, ax, cmap_model, highlight_point_model):
Jp, ap, bp = self.highlight_point_model.get_Jpapbp()
self.marker = self.ax.plot([Jp], [ap], [bp], "y.", mew=3)[0]

gamut_patch = sRGB_gamut_patch()
gamut_patch = sRGB_gamut_patch(uniform_space)
# That function returns a patch where each face is colored to match
# the represented colors. For present purposes we want something
# less... colorful.
Expand Down

0 comments on commit 63708f7

Please sign in to comment.