Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Choldgraf optimize trisurf #481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 25, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Updated test_trisurf_all_args to pass
  • Loading branch information
Kully committed May 25, 2016
commit 694b8aa92b61bbdca8c59b017d2cbbec0830cb9b
23 changes: 17 additions & 6 deletions 23 plotly/tests/test_optional/test_figure_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,14 +689,14 @@ def test_trisurf_all_args(self):
exp_trisurf_plot = {
'data': [
{
'facecolor': ['rgb(143.0, 123.0, 97.000000000000014)',
'rgb(255.0, 127.0, 14.000000000000007)',
'rgb(143.0, 123.0, 97.000000000000014)',
'facecolor': ['rgb(143.0, 123.0, 97.0)',
'rgb(255.0, 127.0, 14.0)',
'rgb(143.0, 123.0, 97.0)',
'rgb(31.0, 119.0, 180.0)',
'rgb(143.0, 123.0, 97.000000000000014)',
'rgb(143.0, 123.0, 97.0)',
'rgb(31.0, 119.0, 180.0)',
'rgb(143.0, 123.0, 97.000000000000014)',
'rgb(255.0, 127.0, 14.000000000000007)'],
'rgb(143.0, 123.0, 97.0)',
'rgb(255.0, 127.0, 14.0)'],
'i': [3, 1, 1, 5, 7, 3, 5, 7],
'j': [1, 3, 5, 1, 3, 7, 7, 5],
'k': [4, 0, 4, 2, 4, 6, 4, 8],
Expand Down Expand Up @@ -753,6 +753,17 @@ def test_trisurf_all_args(self):
self.assert_dict_equal(test_trisurf_plot['data'][1],
exp_trisurf_plot['data'][1])

def test_optimize_trisurf(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I take it you'd like to do this in a later PR?


# check that trisurf will give warnings if the plotting will take
# a long time

pass






class TestScatterPlotMatrix(NumpyTestUtilsMixin, TestCase):

Expand Down
4 changes: 2 additions & 2 deletions 4 plotly/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1567,8 +1567,8 @@ def _trisurf(x, y, z, simplices, colormap=None, dist_func=None,
is_none = [ii is None for ii in [x_edge, y_edge, z_edge]]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we wanted to be extra careful we could add more checks here (e.g., shape is the same for x_edge, y_edge, z_edge)

if any(is_none):
if not all(is_none):
raise ValueError('If any (x_edge, y_edge, z_edge) is None,'
' all must be None')
raise ValueError("If any (x_edge, y_edge, z_edge) is None, "
"all must be None")
else:
x_edge = []
y_edge = []
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.