From 866ea4602624d7af531a4215be6718df76000e27 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Tue, 3 May 2016 13:36:18 -0400 Subject: [PATCH 01/26] First Push for Trisurf Plots --- plotly/tools.py | 333 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 333 insertions(+) diff --git a/plotly/tools.py b/plotly/tools.py index 07995bfe4e7..e28e2c087e3 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1425,6 +1425,12 @@ def return_figure_from_figure_or_data(figure_or_data, validate_figure): _DEFAULT_INCREASING_COLOR = '#3D9970' # http://clrs.cc _DEFAULT_DECREASING_COLOR = '#FF4136' +DEFAULT_PLOTLY_COLORS = ['rgb(31, 119, 180)', 'rgb(255, 127, 14)', + 'rgb(44, 160, 44)', 'rgb(214, 39, 40)', + 'rgb(148, 103, 189)', 'rgb(140, 86, 75)', + 'rgb(227, 119, 194)', 'rgb(127, 127, 127)', + 'rgb(188, 189, 34)', 'rgb(23, 190, 207)'] + class FigureFactory(object): """ @@ -1442,6 +1448,333 @@ class FigureFactory(object): more information and examples of a specific chart type. """ + @staticmethod + def _unlabel_rgb(colors): + unlabelled_colors = [] + for color in colors: + str_vals = '' + for index in range(len(color)): + try: + float(color[index]) + str_vals = str_vals + color[index] + except ValueError: + if (color[index] == ',') or (color[index] == '.'): + str_vals = str_vals + color[index] + + str_vals = str_vals + ',' + numbers = [] + str_num = '' + for char in str_vals: + if char != ',': + str_num = str_num + char + else: + numbers.append(float(str_num)) + str_num = '' + unlabelled_tuple = (numbers[0], numbers[1], numbers[2]) + unlabelled_colors.append(unlabelled_tuple) + + return unlabelled_colors + + @staticmethod + def _find_intermediate_color(tuple1, tuple2, t): + # Given two color tuples (in normalized RGB space) + # and a value 0 < t < 1, spit out a color that is + # t percent from tuple1 to tuple2. + diff_0 = float(tuple2[0] - tuple1[0]) + diff_1 = float(tuple2[1] - tuple1[1]) + diff_2 = float(tuple2[2] - tuple1[2]) + + new_tuple = (tuple1[0] + t*diff_0, + tuple1[1] + t*diff_1, + tuple1[2] + t*diff_2) + return new_tuple + + @staticmethod + def _unconvert_from_RGB_255(colors): + un_rgb_colors = [] + for color in colors: + un_rgb_color = (color[0]/(255.0), + color[1]/(255.0), + color[2]/(255.0)) + + un_rgb_colors.append(un_rgb_color) + return un_rgb_colors + + @staticmethod + def _map_z2color(zval, colormap, vmin, vmax): + # Map the normalized value zval to a + #corresponding color in the colormap + if vmin > vmax: + raise ValueError("Incorrect relation between vmin and vmax." + " The vmin cannot be bigger than vmax.") + t = (zval - vmin)/float((vmax - vmin)) # normalize val + t_color = FigureFactory._find_intermediate_color(colormap[0], + colormap[1], + t) + t_color = (t_color[0]*255.0, t_color[1]*255.0, t_color[2]*255.0) + labelled_color = 'rgb{}'.format(t_color) + + return labelled_color + + @staticmethod + def _tri_indices(simplices): + return ([triplet[c] for triplet in simplices] for c in range(3)) + + @staticmethod + def _plotly_trisurf(x, y, z, simplices, colormap=None, + plot_edges=None): + import numpy as np + from plotly.graph_objs import graph_objs + points3D = np.vstack((x, y, z)).T + + # vertices of the surface triangles + tri_vertices = map(lambda index: points3D[index], simplices) + # mean values of z-coordinates of triangle vertices + zmean = [np.mean(tri[:, 2]) for tri in tri_vertices] + min_zmean = np.min(zmean) + max_zmean = np.max(zmean) + facecolor = ([FigureFactory._map_z2color(zz, colormap, min_zmean, + max_zmean) for zz in zmean]) + I, J, K = FigureFactory._tri_indices(simplices) + + triangles = graph_objs.Mesh3d(x=x, y=y, z=z, facecolor=facecolor, + i=I, j=J, k=K, name='') + + if plot_edges is None: # the triangle sides are not plotted + return graph_objs.Data([triangles]) + + else: + # define the lists Xe, Ye, Ze, of x, y, resp z coordinates of + # edge end points for each triangle + # None separates data corresponding to two consecutive triangles + lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] + for T in tri_vertices] for c in range(3)]) + Xe, Ye, Ze = ([reduce(lambda x, y: x+y, lists_coord[k]) + for k in range(3)]) + + # define the lines to be plotted + lines = graph_objs.Scatter3d( + x=Xe, y=Ye, z=Ze, mode='lines', + line=graph_objs.Line(color='rgb(50,50,50)', + width=1.5) + ) + + return graph_objs.Data([triangles, lines]) + + @staticmethod + def create_trisurf(x, y, z, colormap=None, simplices=None, + title='Trisurf Plot', + showbackground=True, + backgroundcolor='rgb(230, 230, 230)', + gridcolor='rgb(255, 255, 255)', + zerolinecolor='rgb(255, 255, 255)', + height=800, width=800, + aspectratio=dict(x=1, y=1, z=1)): + """ + Returns data for a triangulated surface plot. + + :param (array) x: data values of x in a 1D array + :param (array) y: data values of y in a 1D array + :param (array) z: data values of z in a 1D array + :param (str|list) colormap: either a plotly scale name, or a list + containing 2 triplets. These triplets must be of the form (a,b,c) + or 'rgb(x,y,z)' where a,b,c belong to the interval [0,1] and x,y,z + belong to [0,255] + :param (array) simplices: an array of shape (ntri, 3) where ntri is + the number of triangles in the triangularization. Each row of the + array contains the indicies of the verticies of each triangle. + :param (str) title: title of the plot + :param (bool) showbackground: makes background in plot visible + :param (str) backgroundcolor: color of background. Takes a string of + the form 'rgb(x,y,z)' x,y,z are between 0 and 255 inclusive. + :param (str) gridcolor: color of the gridlines besides the axes. Takes + a string of the form 'rgb(x,y,z)' x,y,z are between 0 and 255 + inclusive. + :param (str) zerolinecolor: color of the axes. Takes a string of the + form 'rgb(x,y,z)' x,y,z are between 0 and 255 inclusive. + :param (int|float) height: the height of the plot (in pixels) + :param (int|float) width: the width of the plot (in pixels) + :param (dict) aspectratio: a dictionary of the aspect ratio values for + the x, y and z axes. 'x', 'y' and 'z' take (int|float) values. + + Example 1: Sphere + ``` + # Necessary Imports for Trisurf + import numpy as np + from scipy.spatial import Delaunay + + import plotly.plotly as py + from plotly.tools import FigureFactory as FF + from plotly.graph_objs import graph_objs + + # Make data for plot + u=np.linspace(0, 2*np.pi, 20) + v=np.linspace(0, np.pi, 20) + u,v=np.meshgrid(u,v) + u=u.flatten() + v=v.flatten() + + x = np.sin(v)*np.cos(u) + y = np.sin(v)*np.sin(u) + z = np.cos(v) + + points2D = np.vstack([u,v]).T + tri = Delaunay(points2D) + simplices = tri.simplices + + # Create a figure + fig1 = FF.create_trisurf(x=x, y=y, z=z, + colormap="Blues", + simplices=simplices) + # Plot the data + py.iplot(fig1, filename='Trisurf Plot') + ``` + + Example 2: Torus + ``` + # Necessary Imports for Trisurf + import numpy as np + from scipy.spatial import Delaunay + + import plotly.plotly as py + from plotly.tools import FigureFactory as FF + from plotly.graph_objs import graph_objs + + # Make data for plot + u=np.linspace(0, 2*np.pi, 20) + v=np.linspace(0, 2*np.pi, 20) + u,v=np.meshgrid(u,v) + u=u.flatten() + v=v.flatten() + + x = (3 + (np.cos(v)))*np.cos(u) + y = (3 + (np.cos(v)))*np.sin(u) + z = np.sin(v) + + points2D = np.vstack([u,v]).T + tri = Delaunay(points2D) + simplices = tri.simplices + + # Create a figure + fig1 = FF.create_trisurf(x=x, y=y, z=z, + colormap="Portland", + simplices=simplices) + # Plot the data + py.iplot(fig1, filename='Trisurf Plot') + ``` + + Example 3: Mobius Band + ``` + # Necessary Imports for Trisurf + import numpy as np + from scipy.spatial import Delaunay + + import plotly.plotly as py + from plotly.tools import FigureFactory as FF + from plotly.graph_objs import graph_objs + + # Make data for plot + u=np.linspace(0, 2*np.pi, 24) + v=np.linspace(-1, 1, 8) + u,v=np.meshgrid(u,v) + u=u.flatten() + v=v.flatten() + + tp = 1 + 0.5*v*np.cos(u/2.) + x=tp*np.cos(u) + y=tp*np.sin(u) + z=0.5*v*np.sin(u/2.) + + points2D = np.vstack([u,v]).T + tri = Delaunay(points2D) + simplices = tri.simplices + + # Create a figure + fig1 = FF.create_trisurf(x=x, y=y, z=z, + colormap=[(0.2, 0.4, 0.6),(1, 1, 1)], + simplices=simplices) + # Plot the data + py.iplot(fig1, filename='Trisurf Plot') + ``` + """ + from plotly.graph_objs import graph_objs + plotly_scales = {'Greys': ['rgb(0,0,0)', 'rgb(255,255,255)'], + 'YlGnBu': ['rgb(8,29,88)', 'rgb(255,255,217)'], + 'Greens': ['rgb(0,68,27)', 'rgb(247,252,245)'], + 'YlOrRd': ['rgb(128,0,38)', 'rgb(255,255,204)'], + 'Bluered': ['rgb(0,0,255)', 'rgb(255,0,0)'], + 'RdBu': ['rgb(5,10,172)', 'rgb(178,10,28)'], + 'Reds': ['rgb(220,220,220)', 'rgb(178,10,28)'], + 'Blues': ['rgb(5,10,172)', 'rgb(220,220,220)'], + 'Picnic': ['rgb(0,0,255)', 'rgb(255,0,0)'], + 'Rainbow': ['rgb(150,0,90)', 'rgb(255,0,0)'], + 'Portland': ['rgb(12,51,131)', 'rgb(217,30,30)'], + 'Jet': ['rgb(0,0,131)', 'rgb(128,0,0)'], + 'Hot': ['rgb(0,0,0)', 'rgb(255,255,255)'], + 'Blackbody': ['rgb(0,0,0)', 'rgb(160,200,255)'], + 'Earth': ['rgb(0,0,130)', 'rgb(255,255,255)'], + 'Electric': ['rgb(0,0,0)', 'rgb(255,250,220)'], + 'Viridis': ['rgb(68,1,84)', 'rgb(253,231,37)']} + + if simplices is None: + raise exceptions.PlotlyError("Make sure you enter 'simplices' " + "in the trisurf function.") + + # Validate colormap + if colormap is None: + colormap = [DEFAULT_PLOTLY_COLORS[0], + DEFAULT_PLOTLY_COLORS[1]] + colormap = FigureFactory._unlabel_rgb(colormap) + colormap = FigureFactory._unconvert_from_RGB_255(colormap) + + if isinstance(colormap, str): + if colormap not in plotly_scales: + raise exceptions.PlotlyError("You must pick a valid " + "plotly colorscale name.") + colormap = [plotly_scales[colormap][0], + plotly_scales[colormap][1]] + colormap = FigureFactory._unlabel_rgb(colormap) + colormap = FigureFactory._unconvert_from_RGB_255(colormap) + + else: + if not isinstance(colormap, list): + raise exceptions.PlotlyError("If 'colormap' is a list, then " + "its items must be tripets of " + "the form a,b,c or 'rgbx,y,z' " + "where a,b,c are between 0 and " + "1 inclusive and x,y,z are " + "between 0 and 255 inclusive.") + if 'rgb' in colormap[0]: + colormap = FigureFactory._unlabel_rgb(colormap) + colormap = FigureFactory._unconvert_from_RGB_255(colormap) + + data1 = FigureFactory._plotly_trisurf(x, y, z, simplices, + colormap=colormap, + plot_edges=True) + axis = dict( + showbackground=showbackground, + backgroundcolor=backgroundcolor, + gridcolor=gridcolor, + zerolinecolor=zerolinecolor, + ) + layout = graph_objs.Layout( + title=title, + width=width, + height=height, + scene=graph_objs.Scene( + xaxis=graph_objs.XAxis(axis), + yaxis=graph_objs.YAxis(axis), + zaxis=graph_objs.ZAxis(axis), + aspectratio=dict( + x=aspectratio['x'], + y=aspectratio['y'], + z=aspectratio['z']), + ) + ) + fig1 = graph_objs.Figure(data=data1, layout=layout) + + return fig1 + @staticmethod def _validate_equal_length(*args): """ From 273fa2bdfb2e142125d46474cb9d3d49cccfc4ff Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Thu, 5 May 2016 16:44:04 -0400 Subject: [PATCH 02/26] Added tests and fixed style/organization --- .../test_optional/test_figure_factory.py | 307 ++++++++++++++++++ plotly/tools.py | 190 +++++++---- 2 files changed, 427 insertions(+), 70 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index f9e107c5dca..b167aca2164 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -8,6 +8,7 @@ from nose.tools import raises import numpy as np +from scipy.spatial import Delaunay class TestDistplot(TestCase): @@ -529,3 +530,309 @@ def test_dendrogram_colorscale(self): self.assert_dict_equal(dendro['data'][0], expected_dendro['data'][0]) self.assert_dict_equal(dendro['data'][1], expected_dendro['data'][1]) self.assert_dict_equal(dendro['data'][2], expected_dendro['data'][2]) + + +class TestTrisurf(NumpyTestUtilsMixin, TestCase): + + def test_vmin_and_vmax(self): + + # check if vmin is greater than or equal to vmax + u = np.linspace(0, 2, 2) + v = np.linspace(0, 2, 2) + u, v = np.meshgrid(u, v) + u = u.flatten() + v = v.flatten() + + x = u + y = v + z = u*v + + points2D = np.vstack([u, v]).T + tri = Delaunay(points2D) + simplices = tri.simplices + + pattern = ( + "Incorrect relation between vmin and vmax. The vmin value cannot " + "be bigger than or equal to the value of vmax." + ) + + self.assertRaisesRegexp(PlotlyError, pattern, + tls.FigureFactory.create_trisurf, + x, y, z, simplices) + + def test_valid_colormap(self): + + # create data for trisurf plot + u = np.linspace(-np.pi, np.pi, 3) + v = np.linspace(-np.pi, np.pi, 3) + u, v = np.meshgrid(u, v) + u = u.flatten() + v = v.flatten() + + x = u + y = u*np.cos(v) + z = u*np.sin(v) + + points2D = np.vstack([u, v]).T + tri = Delaunay(points2D) + simplices = tri.simplices + + # check that a valid plotly colorscale name is entered + self.assertRaises(PlotlyError, tls.FigureFactory.create_trisurf, + x, y, z, simplices, colormap='foo') + + # check that colormap is a list, if not a string + + pattern1 = ( + "If 'colormap' is a list, then its items must be tripets of the " + "form a,b,c or 'rgbx,y,z' where a,b,c are between 0 and 1 " + "inclusive and x,y,z are between 0 and 255 inclusive." + ) + + self.assertRaisesRegexp(PlotlyError, pattern1, + tls.FigureFactory.create_trisurf, + x, y, z, simplices, colormap=3) + + # check: if colormap is a list of rgb color strings, make sure the + # entries of each color are no greater than 255.0 + + pattern2 = ( + "Whoops! The elements in your rgb colormap tuples " + "cannot exceed 255.0." + ) + + self.assertRaisesRegexp(PlotlyError, pattern2, + tls.FigureFactory.create_trisurf, + x, y, z, simplices, + colormap=['rgb(1, 2, 3)', 'rgb(4, 5, 600)']) + + # check: if colormap is a list of tuple colors, make sure the entries + # of each tuple are no greater than 1.0 + + pattern3 = ( + "Whoops! The elements in your rgb colormap tuples " + "cannot exceed 1.0." + ) + + self.assertRaisesRegexp(PlotlyError, pattern3, + tls.FigureFactory.create_trisurf, + x, y, z, simplices, + colormap=[(0.2, 0.4, 0.6), (0.8, 1.0, 1.2)]) + + def test_trisurf_all_args(self): + + # check if trisurf plot matches with expected output + u = np.linspace(-np.pi, np.pi, 3) + v = np.linspace(-np.pi, np.pi, 3) + u, v = np.meshgrid(u, v) + u = u.flatten() + v = v.flatten() + + x = u + y = u*np.cos(v) + z = u*np.sin(v) + + points2D = np.vstack([u, v]).T + tri = Delaunay(points2D) + simplices = tri.simplices + + test_trisurf_plot = tls.FigureFactory.create_trisurf( + x, y, z, simplices, colormap='Blues', + title='Fun', + showbackground=False, + backgroundcolor='rgb(1, 20, 10)', + gridcolor='rgb(0, 20, 50)', + zerolinecolor='rgb(25, 255, 15)', + height=500, width=500, + aspectratio=dict(x=0.7, y=0.6, z=1.2) + ) + + exp_trisurf_plot = { + 'data': [{'facecolor': ['rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(220.0, 220.0, 220.0)', + 'rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(5.0, 10.0, 172.0)', + 'rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(5.0, 10.0, 172.0)', + 'rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(220.0, 220.0, 220.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], + 'name': '', + 'type': 'mesh3d', + 'x': np.array([-3.14159265, + 0., + 3.14159265, + -3.14159265, + 0., + 3.14159265, + -3.14159265, + 0., + 3.14159265]), + 'y': np.array([3.14159265, + -0., + -3.14159265, + -3.14159265, + 0., + 3.14159265, + 3.14159265, + -0., + -3.14159265]), + 'z': np.array([3.84734139e-16, + -0.00000000e+00, + -3.84734139e-16, + -0.00000000e+00, + 0.00000000e+00, + 0.00000000e+00, + -3.84734139e-16, + 0.00000000e+00, + 3.84734139e-16])}, + {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, + 'mode': 'lines', + 'type': 'scatter3d', + 'x': [-3.1415926535897931, + 0.0, + 0.0, + -3.1415926535897931, + None, + 0.0, + -3.1415926535897931, + -3.1415926535897931, + 0.0, + None, + 0.0, + 3.1415926535897931, + 0.0, + 0.0, + None, + 3.1415926535897931, + 0.0, + 3.1415926535897931, + 3.1415926535897931, + None, + 0.0, + -3.1415926535897931, + 0.0, + 0.0, + None, + -3.1415926535897931, + 0.0, + -3.1415926535897931, + -3.1415926535897931, + None, + 3.1415926535897931, + 0.0, + 0.0, + 3.1415926535897931, + None, + 0.0, + 3.1415926535897931, + 3.1415926535897931, + 0.0, + None], + 'y': [-3.1415926535897931, + -0.0, + 0.0, + -3.1415926535897931, + None, + -0.0, + -3.1415926535897931, + 3.1415926535897931, + -0.0, + None, + -0.0, + 3.1415926535897931, + 0.0, + -0.0, + None, + 3.1415926535897931, + -0.0, + -3.1415926535897931, + 3.1415926535897931, + None, + -0.0, + -3.1415926535897931, + 0.0, + -0.0, + None, + -3.1415926535897931, + -0.0, + 3.1415926535897931, + -3.1415926535897931, + None, + 3.1415926535897931, + -0.0, + 0.0, + 3.1415926535897931, + None, + -0.0, + 3.1415926535897931, + -3.1415926535897931, + -0.0, + None], + 'z': [-0.0, + -0.0, + 0.0, + -0.0, + None, + -0.0, + -0.0, + 3.8473413874435795e-16, + -0.0, + None, + -0.0, + 0.0, + 0.0, + -0.0, + None, + 0.0, + -0.0, + -3.8473413874435795e-16, + 0.0, + None, + 0.0, + -0.0, + 0.0, + 0.0, + None, + -0.0, + 0.0, + -3.8473413874435795e-16, + -0.0, + None, + 0.0, + 0.0, + 0.0, + 0.0, + None, + 0.0, + 0.0, + 3.8473413874435795e-16, + 0.0, + None]}], + 'layout': {'height': 500, + 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, + 'xaxis': {'backgroundcolor': 'rgb(1, 20, 10)', + 'gridcolor': 'rgb(0, 20, 50)', + 'showbackground': False, + 'zerolinecolor': 'rgb(25, 255, 15)'}, + 'yaxis': {'backgroundcolor': 'rgb(1, 20, 10)', + 'gridcolor': 'rgb(0, 20, 50)', + 'showbackground': False, + 'zerolinecolor': 'rgb(25, 255, 15)'}, + 'zaxis': {'backgroundcolor': 'rgb(1, 20, 10)', + 'gridcolor': 'rgb(0, 20, 50)', + 'showbackground': False, + 'zerolinecolor': 'rgb(25, 255, 15)'}}, + 'title': 'Fun', + 'width': 500}} + + self.assert_dict_equal(test_trisurf_plot['data'][0], + exp_trisurf_plot['data'][0]) + + self.assert_dict_equal(test_trisurf_plot['data'][1], + exp_trisurf_plot['data'][1]) + + self.assert_dict_equal(test_trisurf_plot['layout'], + exp_trisurf_plot['layout']) diff --git a/plotly/tools.py b/plotly/tools.py index e28e2c087e3..2feaf7bd360 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -22,6 +22,12 @@ from plotly.files import (CONFIG_FILE, CREDENTIALS_FILE, FILE_CONTENT, GRAPH_REFERENCE_FILE, check_file_permissions) +DEFAULT_PLOTLY_COLORS = ['rgb(31, 119, 180)', 'rgb(255, 127, 14)', + 'rgb(44, 160, 44)', 'rgb(214, 39, 40)', + 'rgb(148, 103, 189)', 'rgb(140, 86, 75)', + 'rgb(227, 119, 194)', 'rgb(127, 127, 127)', + 'rgb(188, 189, 34)', 'rgb(23, 190, 207)'] + # Warning format def warning_on_one_line(message, category, filename, lineno, @@ -1425,12 +1431,6 @@ def return_figure_from_figure_or_data(figure_or_data, validate_figure): _DEFAULT_INCREASING_COLOR = '#3D9970' # http://clrs.cc _DEFAULT_DECREASING_COLOR = '#FF4136' -DEFAULT_PLOTLY_COLORS = ['rgb(31, 119, 180)', 'rgb(255, 127, 14)', - 'rgb(44, 160, 44)', 'rgb(214, 39, 40)', - 'rgb(148, 103, 189)', 'rgb(140, 86, 75)', - 'rgb(227, 119, 194)', 'rgb(127, 127, 127)', - 'rgb(188, 189, 34)', 'rgb(23, 190, 207)'] - class FigureFactory(object): """ @@ -1450,6 +1450,12 @@ class FigureFactory(object): @staticmethod def _unlabel_rgb(colors): + """ + This function takes a list of two 'rgb(a, b, c)' color strings and + returns a list of the color tuples in tuple form without the 'rgb' + label. In particular, the output is a list of two tuples of the form + (a, b, c) + """ unlabelled_colors = [] for color in colors: str_vals = '' @@ -1477,9 +1483,11 @@ def _unlabel_rgb(colors): @staticmethod def _find_intermediate_color(tuple1, tuple2, t): - # Given two color tuples (in normalized RGB space) - # and a value 0 < t < 1, spit out a color that is - # t percent from tuple1 to tuple2. + """ + This function takes two color tuples, where each element is between 0 + and 1, along with a value 0 < t < 1 and returns a color that is + t percent from tuple1 to tuple2, where t = 1 is 100 percent + """ diff_0 = float(tuple2[0] - tuple1[0]) diff_1 = float(tuple2[1] - tuple1[1]) diff_2 = float(tuple2[2] - tuple1[2]) @@ -1487,10 +1495,16 @@ def _find_intermediate_color(tuple1, tuple2, t): new_tuple = (tuple1[0] + t*diff_0, tuple1[1] + t*diff_1, tuple1[2] + t*diff_2) + return new_tuple @staticmethod def _unconvert_from_RGB_255(colors): + """ + Takes a list of color tuples where each element is between 0 and 255 + and returns the same list where each tuple element is normalized to be + between 0 and 1 + """ un_rgb_colors = [] for color in colors: un_rgb_color = (color[0]/(255.0), @@ -1498,16 +1512,25 @@ def _unconvert_from_RGB_255(colors): color[2]/(255.0)) un_rgb_colors.append(un_rgb_color) + return un_rgb_colors @staticmethod def _map_z2color(zval, colormap, vmin, vmax): - # Map the normalized value zval to a - #corresponding color in the colormap - if vmin > vmax: - raise ValueError("Incorrect relation between vmin and vmax." - " The vmin cannot be bigger than vmax.") - t = (zval - vmin)/float((vmax - vmin)) # normalize val + """ + This function takes a z value (zval) along with a colormap and a + minimum (vmin) and maximum (vmax) range of possible z values for the + given parametrized surface. It returns an rgb color based on the + relative position of zval between vmin and vmax + """ + if vmin >= vmax: + raise exceptions.PlotlyError("Incorrect relation between vmin " + "and vmax. The vmin value cannot be " + "bigger than or equal to the value " + "of vmax.") + # find distance t of zval from vmin to vmax where the distance + # is normalized to be between 0 and 1 + t = (zval - vmin)/float((vmax - vmin)) t_color = FigureFactory._find_intermediate_color(colormap[0], colormap[1], t) @@ -1518,11 +1541,22 @@ def _map_z2color(zval, colormap, vmin, vmax): @staticmethod def _tri_indices(simplices): + """ + Returns a triplet of 3 lists such that each list contains the kth + index of each triplet of the simplicies, where k is 0, 1 and 2 + """ return ([triplet[c] for triplet in simplices] for c in range(3)) @staticmethod - def _plotly_trisurf(x, y, z, simplices, colormap=None, - plot_edges=None): + def _trisurf(x, y, z, simplices, colormap=None, + plot_edges=None): + """ + Refer to FigureFactory.create_trisurf() for docstring + """ + # numpy import check + if _numpy_imported is False: + raise ImportError("FigureFactory._trisurf() requires " + "numpy imported.") import numpy as np from plotly.graph_objs import graph_objs points3D = np.vstack((x, y, z)).T @@ -1543,26 +1577,25 @@ def _plotly_trisurf(x, y, z, simplices, colormap=None, if plot_edges is None: # the triangle sides are not plotted return graph_objs.Data([triangles]) - else: - # define the lists Xe, Ye, Ze, of x, y, resp z coordinates of - # edge end points for each triangle - # None separates data corresponding to two consecutive triangles - lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] - for T in tri_vertices] for c in range(3)]) - Xe, Ye, Ze = ([reduce(lambda x, y: x+y, lists_coord[k]) - for k in range(3)]) - - # define the lines to be plotted - lines = graph_objs.Scatter3d( - x=Xe, y=Ye, z=Ze, mode='lines', - line=graph_objs.Line(color='rgb(50,50,50)', - width=1.5) - ) + # define the lists Xe, Ye, Ze, of x, y, resp z coordinates of + # edge end points for each triangle + # None separates data corresponding to two consecutive triangles + lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] + for T in tri_vertices] for c in range(3)]) + Xe, Ye, Ze = ([reduce(lambda x, y: x+y, lists_coord[k]) + for k in range(3)]) + + # define the lines to be plotted + lines = graph_objs.Scatter3d( + x=Xe, y=Ye, z=Ze, mode='lines', + line=graph_objs.Line(color='rgb(50, 50, 50)', + width=1.5) + ) - return graph_objs.Data([triangles, lines]) + return graph_objs.Data([triangles, lines]) @staticmethod - def create_trisurf(x, y, z, colormap=None, simplices=None, + def create_trisurf(x, y, z, simplices, colormap=None, title='Trisurf Plot', showbackground=True, backgroundcolor='rgb(230, 230, 230)', @@ -1571,18 +1604,18 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, height=800, width=800, aspectratio=dict(x=1, y=1, z=1)): """ - Returns data for a triangulated surface plot. + Returns figure for a triangulated surface plot :param (array) x: data values of x in a 1D array :param (array) y: data values of y in a 1D array :param (array) z: data values of z in a 1D array + :param (array) simplices: an array of shape (ntri, 3) where ntri is + the number of triangles in the triangularization. Each row of the + array contains the indicies of the verticies of each triangle. :param (str|list) colormap: either a plotly scale name, or a list containing 2 triplets. These triplets must be of the form (a,b,c) or 'rgb(x,y,z)' where a,b,c belong to the interval [0,1] and x,y,z belong to [0,255] - :param (array) simplices: an array of shape (ntri, 3) where ntri is - the number of triangles in the triangularization. Each row of the - array contains the indicies of the verticies of each triangle. :param (str) title: title of the plot :param (bool) showbackground: makes background in plot visible :param (str) backgroundcolor: color of background. Takes a string of @@ -1608,11 +1641,11 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, from plotly.graph_objs import graph_objs # Make data for plot - u=np.linspace(0, 2*np.pi, 20) - v=np.linspace(0, np.pi, 20) - u,v=np.meshgrid(u,v) - u=u.flatten() - v=v.flatten() + u = np.linspace(0, 2*np.pi, 20) + v = np.linspace(0, np.pi, 20) + u,v = np.meshgrid(u,v) + u = u.flatten() + v = v.flatten() x = np.sin(v)*np.cos(u) y = np.sin(v)*np.sin(u) @@ -1627,7 +1660,7 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, colormap="Blues", simplices=simplices) # Plot the data - py.iplot(fig1, filename='Trisurf Plot') + py.iplot(fig1, filename='Trisurf Plot - Sphere') ``` Example 2: Torus @@ -1641,11 +1674,11 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, from plotly.graph_objs import graph_objs # Make data for plot - u=np.linspace(0, 2*np.pi, 20) - v=np.linspace(0, 2*np.pi, 20) - u,v=np.meshgrid(u,v) - u=u.flatten() - v=v.flatten() + u = np.linspace(0, 2*np.pi, 20) + v = np.linspace(0, 2*np.pi, 20) + u,v = np.meshgrid(u,v) + u = u.flatten() + v = v.flatten() x = (3 + (np.cos(v)))*np.cos(u) y = (3 + (np.cos(v)))*np.sin(u) @@ -1660,7 +1693,7 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, colormap="Portland", simplices=simplices) # Plot the data - py.iplot(fig1, filename='Trisurf Plot') + py.iplot(fig1, filename='Trisurf Plot - Torus') ``` Example 3: Mobius Band @@ -1674,16 +1707,16 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, from plotly.graph_objs import graph_objs # Make data for plot - u=np.linspace(0, 2*np.pi, 24) - v=np.linspace(-1, 1, 8) - u,v=np.meshgrid(u,v) - u=u.flatten() - v=v.flatten() + u = np.linspace(0, 2*np.pi, 24) + v = np.linspace(-1, 1, 8) + u,v = np.meshgrid(u,v) + u = u.flatten() + v = v.flatten() tp = 1 + 0.5*v*np.cos(u/2.) - x=tp*np.cos(u) - y=tp*np.sin(u) - z=0.5*v*np.sin(u/2.) + x = tp*np.cos(u) + y = tp*np.sin(u) + z = 0.5*v*np.sin(u/2.) points2D = np.vstack([u,v]).T tri = Delaunay(points2D) @@ -1694,7 +1727,7 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, colormap=[(0.2, 0.4, 0.6),(1, 1, 1)], simplices=simplices) # Plot the data - py.iplot(fig1, filename='Trisurf Plot') + py.iplot(fig1, filename='Trisurf Plot - Mobius Band') ``` """ from plotly.graph_objs import graph_objs @@ -1716,10 +1749,6 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, 'Electric': ['rgb(0,0,0)', 'rgb(255,250,220)'], 'Viridis': ['rgb(68,1,84)', 'rgb(253,231,37)']} - if simplices is None: - raise exceptions.PlotlyError("Make sure you enter 'simplices' " - "in the trisurf function.") - # Validate colormap if colormap is None: colormap = [DEFAULT_PLOTLY_COLORS[0], @@ -1730,7 +1759,12 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, if isinstance(colormap, str): if colormap not in plotly_scales: raise exceptions.PlotlyError("You must pick a valid " - "plotly colorscale name.") + "plotly colorscale " + "name from {}" + .format( + list(plotly_scales.keys()) + ) + ) colormap = [plotly_scales[colormap][0], plotly_scales[colormap][1]] colormap = FigureFactory._unlabel_rgb(colormap) @@ -1746,11 +1780,29 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, "between 0 and 255 inclusive.") if 'rgb' in colormap[0]: colormap = FigureFactory._unlabel_rgb(colormap) + for color in colormap: + for index in range(3): + if color[index] > 255.0: + raise exceptions.PlotlyError("Whoops! The " + "elements in your " + "rgb colormap " + "tuples cannot " + "exceed 255.0.") colormap = FigureFactory._unconvert_from_RGB_255(colormap) - data1 = FigureFactory._plotly_trisurf(x, y, z, simplices, - colormap=colormap, - plot_edges=True) + if isinstance(colormap[0], tuple): + for color in colormap: + for index in range(3): + if color[index] > 1.0: + raise exceptions.PlotlyError("Whoops! The " + "elements in your " + "rgb colormap " + "tuples cannot " + "exceed 1.0.") + + data1 = FigureFactory._trisurf(x, y, z, simplices, + colormap=colormap, + plot_edges=True) axis = dict( showbackground=showbackground, backgroundcolor=backgroundcolor, @@ -1771,9 +1823,7 @@ def create_trisurf(x, y, z, colormap=None, simplices=None, z=aspectratio['z']), ) ) - fig1 = graph_objs.Figure(data=data1, layout=layout) - - return fig1 + return graph_objs.Figure(data=data1, layout=layout) @staticmethod def _validate_equal_length(*args): From 037a89d46ea4be985ba5aafdd21caf797dabafff Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Thu, 5 May 2016 16:51:22 -0400 Subject: [PATCH 03/26] Updated Schema --- plotly/graph_reference/default-schema.json | 5256 ++++++++++++++------ 1 file changed, 3692 insertions(+), 1564 deletions(-) diff --git a/plotly/graph_reference/default-schema.json b/plotly/graph_reference/default-schema.json index dae5a528c2e..4972b981cb2 100644 --- a/plotly/graph_reference/default-schema.json +++ b/plotly/graph_reference/default-schema.json @@ -22,13 +22,6 @@ ], "requiredOpts": [] }, - "axisid": { - "description": "An axis id string (e.g. 'x', 'x2', 'x3', ...).", - "otherOpts": [ - "dflt" - ], - "requiredOpts": [] - }, "boolean": { "description": "A boolean (true/false) value.", "otherOpts": [ @@ -79,13 +72,6 @@ "flags" ] }, - "geoid": { - "description": "A geo id string (e.g. 'geo', 'geo2', 'geo3', ...).", - "otherOpts": [ - "dflt" - ], - "requiredOpts": [] - }, "info_array": { "description": "An {array} of plot information.", "otherOpts": [ @@ -114,13 +100,6 @@ ], "requiredOpts": [] }, - "sceneid": { - "description": "A scene id string (e.g. 'scene', 'scene2', 'scene3', ...).", - "otherOpts": [ - "dflt" - ], - "requiredOpts": [] - }, "string": { "description": "A string value. Numbers are converted to strings except for attributes with `strict` set to true.", "otherOpts": [ @@ -131,6 +110,13 @@ "values" ], "requiredOpts": [] + }, + "subplotid": { + "description": "An id string of a subplot type (given by dflt), optionally followed by an integer >1. e.g. if dflt='geo', we can have 'geo', 'geo2', 'geo3', ...", + "otherOpts": [ + "dflt" + ], + "requiredOpts": [] } } }, @@ -1289,6 +1275,34 @@ "role": "style", "valType": "color" }, + "categoryarray": { + "description": "Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to *array*. Used with `categoryorder`.", + "role": "data", + "valType": "data_array" + }, + "categoryarraysrc": { + "description": "Sets the source reference on plot.ly for categoryarray .", + "role": "info", + "valType": "string" + }, + "categoryorder": { + "description": "Specifies the ordering logic for the case of categorical variables. By default, plotly uses *trace*, which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.", + "dflt": "trace", + "role": "info", + "valType": "enumerated", + "values": [ + "trace", + "category ascending", + "category descending", + "array" + ] + }, + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, "dtick": { "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", "dflt": 1, @@ -1465,7 +1479,7 @@ }, "spikecolor": { "description": "Sets the color of the spikes.", - "dflt": "rgb(0,0,0)", + "dflt": "#444", "role": "style", "valType": "color" }, @@ -1666,6 +1680,34 @@ "role": "style", "valType": "color" }, + "categoryarray": { + "description": "Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to *array*. Used with `categoryorder`.", + "role": "data", + "valType": "data_array" + }, + "categoryarraysrc": { + "description": "Sets the source reference on plot.ly for categoryarray .", + "role": "info", + "valType": "string" + }, + "categoryorder": { + "description": "Specifies the ordering logic for the case of categorical variables. By default, plotly uses *trace*, which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.", + "dflt": "trace", + "role": "info", + "valType": "enumerated", + "values": [ + "trace", + "category ascending", + "category descending", + "array" + ] + }, + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, "dtick": { "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", "dflt": 1, @@ -1842,7 +1884,7 @@ }, "spikecolor": { "description": "Sets the color of the spikes.", - "dflt": "rgb(0,0,0)", + "dflt": "#444", "role": "style", "valType": "color" }, @@ -2043,6 +2085,34 @@ "role": "style", "valType": "color" }, + "categoryarray": { + "description": "Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to *array*. Used with `categoryorder`.", + "role": "data", + "valType": "data_array" + }, + "categoryarraysrc": { + "description": "Sets the source reference on plot.ly for categoryarray .", + "role": "info", + "valType": "string" + }, + "categoryorder": { + "description": "Specifies the ordering logic for the case of categorical variables. By default, plotly uses *trace*, which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.", + "dflt": "trace", + "role": "info", + "valType": "enumerated", + "values": [ + "trace", + "category ascending", + "category descending", + "array" + ] + }, + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, "dtick": { "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", "dflt": 1, @@ -2219,7 +2289,7 @@ }, "spikecolor": { "description": "Sets the color of the spikes.", - "dflt": "rgb(0,0,0)", + "dflt": "#444", "role": "style", "valType": "color" }, @@ -2418,6 +2488,16 @@ "role": "info", "valType": "color" }, + "layer": { + "description": "Specifies whether shapes are drawn below or above traces.", + "dflt": "above", + "role": "info", + "valType": "enumerated", + "values": [ + "below", + "above" + ] + }, "line": { "color": { "description": "Sets the line color.", @@ -2527,282 +2607,160 @@ false ] }, - "title": { - "description": "Sets the plot's title.", - "dflt": "Click to enter Plot title", - "role": "info", - "valType": "string" - }, - "titlefont": { - "color": { - "role": "style", - "valType": "color" - }, - "description": "Sets the title font.", - "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", - "noBlank": true, - "role": "style", - "strict": true, - "valType": "string" - }, - "role": "object", - "size": { - "min": 1, - "role": "style", - "valType": "number" - } - }, - "width": { - "description": "Sets the plot's width (in px).", - "dflt": 700, - "min": 10, - "role": "info", - "valType": "number" - }, - "xaxis": { - "_deprecated": { - "autotick": { - "description": "Obsolete. Set `tickmode` to *auto* for old `autotick` *true* behavior. Set `tickmode` to *linear* for `autotick` *false*.", + "ternary": { + "_isSubplotObj": true, + "aaxis": { + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "dtick": { + "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", + "dflt": 1, + "role": "style", + "valType": "any" + }, + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "role": "style", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] + }, + "gridcolor": { + "description": "Sets the color of the grid lines.", + "dflt": "#eee", + "role": "style", + "valType": "color" + }, + "gridwidth": { + "description": "Sets the width (in px) of the grid lines.", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "hoverformat": { + "description": "Sets the hover text formatting rule for data values on this axis, using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "linecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "linewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "min": { + "description": "The minimum value visible on this axis. The maximum is determined by the sum minus the minimum values of the other two axes. The full view corresponds to all the minima set to zero.", + "dflt": 0, + "min": 0, "role": "info", + "valType": "number" + }, + "nticks": { + "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 6, + "min": 1, + "role": "style", + "valType": "integer" + }, + "role": "object", + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showgrid": { + "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "dflt": true, + "role": "style", "valType": "boolean" - } - }, - "_isSubplotObj": true, - "anchor": { - "description": "If set to an opposite-letter axis id (e.g. `xaxis2`, `yaxis`), this axis is bound to the corresponding opposite-letter axis. If set to *free*, this axis' position is determined by `position`.", - "role": "info", - "valType": "enumerated", - "values": [ - "free", - "/^x([2-9]|[1-9][0-9]+)?$/", - "/^y([2-9]|[1-9][0-9]+)?$/" - ] - }, - "autorange": { - "description": "Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided, then `autorange` is set to *false*.", - "dflt": true, - "role": "style", - "valType": "enumerated", - "values": [ - true, - false, - "reversed" - ] - }, - "domain": { - "description": "Sets the domain of this axis (in plot fraction).", - "dflt": [ - 0, - 1 - ], - "items": [ - { - "max": 1, - "min": 0, - "valType": "number" - }, - { - "max": 1, - "min": 0, - "valType": "number" - } - ], - "role": "info", - "valType": "info_array" - }, - "dtick": { - "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", - "dflt": 1, - "role": "style", - "valType": "any" - }, - "exponentformat": { - "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", - "dflt": "B", - "role": "style", - "valType": "enumerated", - "values": [ - "none", - "e", - "E", - "power", - "SI", - "B" - ] - }, - "fixedrange": { - "description": "Determines whether or not this axis is zoom-able. If true, then zoom is disabled.", - "dflt": false, - "role": "info", - "valType": "boolean" - }, - "gridcolor": { - "description": "Sets the color of the grid lines.", - "dflt": "#eee", - "role": "style", - "valType": "color" - }, - "gridwidth": { - "description": "Sets the width (in px) of the grid lines.", - "dflt": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "hoverformat": { - "description": "Sets the hover text formatting rule for data values on this axis, using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", - "dflt": "", - "role": "style", - "valType": "string" - }, - "linecolor": { - "description": "Sets the axis line color.", - "dflt": "#444", - "role": "style", - "valType": "color" - }, - "linewidth": { - "description": "Sets the width (in px) of the axis line.", - "dflt": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "mirror": { - "description": "Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If *true*, the axis lines are mirrored. If *ticks*, the axis lines and ticks are mirrored. If *false*, mirroring is disable. If *all*, axis lines are mirrored on all shared-axes subplots. If *allticks*, axis lines and ticks are mirrored on all shared-axes subplots.", - "dflt": false, - "role": "style", - "valType": "enumerated", - "values": [ - true, - "ticks", - false, - "all", - "allticks" - ] - }, - "nticks": { - "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", - "dflt": 0, - "min": 0, - "role": "style", - "valType": "integer" - }, - "overlaying": { - "description": "If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis. If *false*, this axis does not overlay any same-letter axes.", - "role": "info", - "valType": "enumerated", - "values": [ - "free", - "/^x([2-9]|[1-9][0-9]+)?$/", - "/^y([2-9]|[1-9][0-9]+)?$/" - ] - }, - "position": { - "description": "Sets the position of this axis in the plotting space (in normalized coordinates). Only has an effect if `anchor` is set to *free*.", - "dflt": 0, - "max": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "range": { - "description": "Sets the range of this axis. If the axis `type` is *log*, then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the date range from January 1st 1970 to November 4th, 2013, set the range from 0 to 1380844800000.0", - "items": [ - { - "valType": "number" - }, - { - "valType": "number" - } - ], - "role": "info", - "valType": "info_array" - }, - "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", - "dflt": "normal", - "role": "style", - "valType": "enumerated", - "values": [ - "normal", - "tozero", - "nonnegative" - ] - }, - "rangeselector": { - "bgcolor": { - "description": "Sets the background color of the range selector buttons.", - "dflt": "#eee", + }, + "showline": { + "description": "Determines whether or not a line bounding this axis is drawn.", + "dflt": true, "role": "style", - "valType": "color" + "valType": "boolean" }, - "bordercolor": { - "description": "Sets the color of the border enclosing the range selector.", - "dflt": "#444", + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, "role": "style", - "valType": "color" + "valType": "boolean" }, - "borderwidth": { - "description": "Sets the width (in px) of the border enclosing the range selector.", + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", "dflt": 0, - "min": 0, "role": "style", "valType": "number" }, - "buttons": { - "items": { - "button": { - "count": { - "description": "Sets the number of steps to take to update the range. Use with `step` to specify the update interval.", - "dflt": 1, - "min": 0, - "role": "info", - "valType": "number" - }, - "description": "Sets the specifications for each buttons. By default, a range selector comes with no buttons.", - "label": { - "description": "Sets the text label to appear on the button.", - "role": "info", - "valType": "string" - }, - "role": "object", - "step": { - "description": "The unit of measurement that the `count` value will set the range by.", - "dflt": "month", - "role": "info", - "valType": "enumerated", - "values": [ - "month", - "year", - "day", - "hour", - "minute", - "second", - "all" - ] - }, - "stepmode": { - "description": "Sets the range update mode. If *backward*, the range update shifts the start of range back *count* times *step* milliseconds. If *todate*, the range update shifts the start of range back to the first timestamp from *count* times *step* milliseconds back. For example, with `step` set to *year* and `count` set to *1* the range update shifts the start of the range back to January 01 of the current year.", - "dflt": "backward", - "role": "info", - "valType": "enumerated", - "values": [ - "backward", - "todate" - ] - } - } - }, - "role": "object" + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "role": "style", + "valType": "angle" }, - "font": { + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "tickfont": { "color": { "role": "style", "valType": "color" }, - "description": "Sets the font of the range selector button text.", + "description": "Sets the tick font.", "family": { "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", "noBlank": true, @@ -2817,561 +2775,526 @@ "valType": "number" } }, - "role": "object", - "visible": { - "description": "Determines whether or not this range selector is visible. Note that range selectors are only available for x axes of `type` set to or auto-typed to *date*.", - "role": "info", - "valType": "boolean" + "tickformat": { + "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" }, - "x": { - "description": "Sets the x position (in normalized coordinates) of the range selector.", - "max": 3, - "min": -2, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "min": 0, "role": "style", "valType": "number" }, - "xanchor": { - "description": "Sets the range selector's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the range selector.", - "dflt": "left", + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", "role": "info", "valType": "enumerated", "values": [ "auto", - "left", - "center", - "right" + "linear", + "array" ] }, - "y": { - "description": "Sets the y position (in normalized coordinates) of the range selector.", - "max": 3, - "min": -2, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", "role": "style", - "valType": "number" + "valType": "string" }, - "yanchor": { - "description": "Sets the range selector's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the range selector.", - "dflt": "bottom", - "role": "info", + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "role": "style", "valType": "enumerated", "values": [ - "auto", - "top", - "middle", - "bottom" + "outside", + "inside", + "" ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on plot.ly for ticktext .", + "role": "info", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on plot.ly for tickvals .", + "role": "info", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "title": { + "description": "Sets the title of this axis.", + "role": "info", + "valType": "string" + }, + "titlefont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets this axis' title font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } } }, - "rangeslider": { - "bgcolor": { - "description": "Sets the background color of the range slider.", - "dflt": "#fff", + "baxis": { + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", "role": "style", "valType": "color" }, - "bordercolor": { - "description": "Sets the border color of the range slider.", - "dflt": "#444", + "dtick": { + "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", + "dflt": 1, + "role": "style", + "valType": "any" + }, + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "role": "style", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] + }, + "gridcolor": { + "description": "Sets the color of the grid lines.", + "dflt": "#eee", "role": "style", "valType": "color" }, - "borderwidth": { - "description": "Sets the border color of the range slider.", - "dflt": 0, + "gridwidth": { + "description": "Sets the width (in px) of the grid lines.", + "dflt": 1, "min": 0, "role": "style", - "valType": "integer" + "valType": "number" }, - "role": "object", - "thickness": { - "description": "The height of the range slider as a fraction of the total plot area height.", - "dflt": 0.15, - "max": 1, + "hoverformat": { + "description": "Sets the hover text formatting rule for data values on this axis, using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "linecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "linewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, "min": 0, "role": "style", "valType": "number" }, - "visible": { - "description": "Determines whether or not the range slider will be visible. If visible, perpendicular axes will be set to `fixedrange`", - "dflt": true, + "min": { + "description": "The minimum value visible on this axis. The maximum is determined by the sum minus the minimum values of the other two axes. The full view corresponds to all the minima set to zero.", + "dflt": 0, + "min": 0, "role": "info", - "valType": "boolean" - } - }, - "role": "object", - "showexponent": { - "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", - "dflt": "all", - "role": "style", - "valType": "enumerated", - "values": [ - "all", - "first", - "last", - "none" - ] - }, - "showgrid": { - "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", - "role": "style", - "valType": "boolean" - }, - "showline": { - "description": "Determines whether or not a line bounding this axis is drawn.", - "dflt": false, - "role": "style", - "valType": "boolean" - }, - "showticklabels": { - "description": "Determines whether or not the tick labels are drawn.", - "dflt": true, - "role": "style", - "valType": "boolean" - }, - "showtickprefix": { - "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", - "dflt": "all", - "role": "style", - "valType": "enumerated", - "values": [ - "all", - "first", - "last", - "none" - ] - }, - "showticksuffix": { - "description": "Same as `showtickprefix` but for tick suffixes.", - "dflt": "all", - "role": "style", - "valType": "enumerated", - "values": [ - "all", - "first", - "last", - "none" - ] - }, - "side": { - "description": "Determines whether a x (y) axis is positioned at the *bottom* (*left*) or *top* (*right*) of the plotting area.", - "role": "info", - "valType": "enumerated", - "values": [ - "top", - "bottom", - "left", - "right" - ] - }, - "tick0": { - "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", - "dflt": 0, - "role": "style", - "valType": "number" - }, - "tickangle": { - "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", - "dflt": "auto", - "role": "style", - "valType": "angle" - }, - "tickcolor": { - "description": "Sets the tick color.", - "dflt": "#444", - "role": "style", - "valType": "color" - }, - "tickfont": { - "color": { - "role": "style", - "valType": "color" + "valType": "number" }, - "description": "Sets the tick font.", - "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", - "noBlank": true, + "nticks": { + "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 6, + "min": 1, "role": "style", - "strict": true, - "valType": "string" + "valType": "integer" }, "role": "object", - "size": { - "min": 1, + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", "role": "style", - "valType": "number" - } - }, - "tickformat": { - "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", - "dflt": "", - "role": "style", - "valType": "string" - }, - "ticklen": { - "description": "Sets the tick length (in px).", - "dflt": 5, - "min": 0, - "role": "style", - "valType": "number" - }, - "tickmode": { - "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", - "role": "info", - "valType": "enumerated", - "values": [ - "auto", - "linear", - "array" - ] - }, - "tickprefix": { - "description": "Sets a tick label prefix.", - "dflt": "", - "role": "style", - "valType": "string" - }, - "ticks": { - "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", - "role": "style", - "valType": "enumerated", - "values": [ - "outside", - "inside", - "" - ] - }, - "ticksuffix": { - "description": "Sets a tick label suffix.", - "dflt": "", - "role": "style", - "valType": "string" - }, - "ticktext": { - "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", - "role": "data", - "valType": "data_array" - }, - "ticktextsrc": { - "description": "Sets the source reference on plot.ly for ticktext .", - "role": "info", - "valType": "string" - }, - "tickvals": { - "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", - "role": "data", - "valType": "data_array" - }, - "tickvalssrc": { - "description": "Sets the source reference on plot.ly for tickvals .", - "role": "info", - "valType": "string" - }, - "tickwidth": { - "description": "Sets the tick width (in px).", - "dflt": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "title": { - "description": "Sets the title of this axis.", - "role": "info", - "valType": "string" - }, - "titlefont": { - "color": { + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showgrid": { + "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showline": { + "description": "Determines whether or not a line bounding this axis is drawn.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", + "dflt": 0, + "role": "style", + "valType": "number" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "role": "style", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", "role": "style", "valType": "color" }, - "description": "Sets this axis' title font.", - "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", - "noBlank": true, + "tickfont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets the tick font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "tickformat": { + "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", "role": "style", - "strict": true, "valType": "string" }, - "role": "object", - "size": { - "min": 1, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "min": 0, + "role": "style", + "valType": "number" + }, + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ] + }, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "role": "style", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on plot.ly for ticktext .", + "role": "info", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on plot.ly for tickvals .", + "role": "info", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "min": 0, "role": "style", "valType": "number" + }, + "title": { + "description": "Sets the title of this axis.", + "role": "info", + "valType": "string" + }, + "titlefont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets this axis' title font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } } }, - "type": { - "description": "Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question.", - "dflt": "-", - "role": "info", - "valType": "enumerated", - "values": [ - "-", - "linear", - "log", - "date", - "category" - ] - }, - "zeroline": { - "description": "Determines whether or not a line is drawn at along the 0 value of this axis. If *true*, the zero line is drawn on top of the grid lines.", - "role": "style", - "valType": "boolean" - }, - "zerolinecolor": { - "description": "Sets the line color of the zero line.", - "dflt": "#444", - "role": "style", - "valType": "color" - }, - "zerolinewidth": { - "description": "Sets the width (in px) of the zero line.", - "dflt": 1, - "role": "style", - "valType": "number" - } - }, - "yaxis": { - "_deprecated": { - "autotick": { - "description": "Obsolete. Set `tickmode` to *auto* for old `autotick` *true* behavior. Set `tickmode` to *linear* for `autotick` *false*.", - "role": "info", - "valType": "boolean" - } - }, - "_isSubplotObj": true, - "anchor": { - "description": "If set to an opposite-letter axis id (e.g. `xaxis2`, `yaxis`), this axis is bound to the corresponding opposite-letter axis. If set to *free*, this axis' position is determined by `position`.", - "role": "info", - "valType": "enumerated", - "values": [ - "free", - "/^x([2-9]|[1-9][0-9]+)?$/", - "/^y([2-9]|[1-9][0-9]+)?$/" - ] - }, - "autorange": { - "description": "Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided, then `autorange` is set to *false*.", - "dflt": true, - "role": "style", - "valType": "enumerated", - "values": [ - true, - false, - "reversed" - ] - }, - "domain": { - "description": "Sets the domain of this axis (in plot fraction).", - "dflt": [ - 0, - 1 - ], - "items": [ - { - "max": 1, - "min": 0, - "valType": "number" - }, - { - "max": 1, - "min": 0, - "valType": "number" - } - ], - "role": "info", - "valType": "info_array" - }, - "dtick": { - "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", - "dflt": 1, - "role": "style", - "valType": "any" - }, - "exponentformat": { - "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", - "dflt": "B", - "role": "style", - "valType": "enumerated", - "values": [ - "none", - "e", - "E", - "power", - "SI", - "B" - ] - }, - "fixedrange": { - "description": "Determines whether or not this axis is zoom-able. If true, then zoom is disabled.", - "dflt": false, - "role": "info", - "valType": "boolean" - }, - "gridcolor": { - "description": "Sets the color of the grid lines.", - "dflt": "#eee", - "role": "style", - "valType": "color" - }, - "gridwidth": { - "description": "Sets the width (in px) of the grid lines.", - "dflt": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "hoverformat": { - "description": "Sets the hover text formatting rule for data values on this axis, using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", - "dflt": "", - "role": "style", - "valType": "string" - }, - "linecolor": { - "description": "Sets the axis line color.", - "dflt": "#444", + "bgcolor": { + "description": "Set the background color of the subplot", + "dflt": "#fff", "role": "style", "valType": "color" }, - "linewidth": { - "description": "Sets the width (in px) of the axis line.", - "dflt": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "mirror": { - "description": "Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If *true*, the axis lines are mirrored. If *ticks*, the axis lines and ticks are mirrored. If *false*, mirroring is disable. If *all*, axis lines are mirrored on all shared-axes subplots. If *allticks*, axis lines and ticks are mirrored on all shared-axes subplots.", - "dflt": false, - "role": "style", - "valType": "enumerated", - "values": [ - true, - "ticks", - false, - "all", - "allticks" - ] - }, - "nticks": { - "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", - "dflt": 0, - "min": 0, - "role": "style", - "valType": "integer" - }, - "overlaying": { - "description": "If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis. If *false*, this axis does not overlay any same-letter axes.", - "role": "info", - "valType": "enumerated", - "values": [ - "free", - "/^x([2-9]|[1-9][0-9]+)?$/", - "/^y([2-9]|[1-9][0-9]+)?$/" - ] - }, - "position": { - "description": "Sets the position of this axis in the plotting space (in normalized coordinates). Only has an effect if `anchor` is set to *free*.", - "dflt": 0, - "max": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "range": { - "description": "Sets the range of this axis. If the axis `type` is *log*, then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the date range from January 1st 1970 to November 4th, 2013, set the range from 0 to 1380844800000.0", - "items": [ - { - "valType": "number" - }, - { - "valType": "number" - } - ], - "role": "info", - "valType": "info_array" - }, - "rangemode": { - "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", - "dflt": "normal", - "role": "style", - "valType": "enumerated", - "values": [ - "normal", - "tozero", - "nonnegative" - ] - }, - "rangeselector": { - "bgcolor": { - "description": "Sets the background color of the range selector buttons.", + "caxis": { + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "dtick": { + "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", + "dflt": 1, + "role": "style", + "valType": "any" + }, + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "role": "style", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] + }, + "gridcolor": { + "description": "Sets the color of the grid lines.", "dflt": "#eee", "role": "style", "valType": "color" }, - "bordercolor": { - "description": "Sets the color of the border enclosing the range selector.", + "gridwidth": { + "description": "Sets the width (in px) of the grid lines.", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "hoverformat": { + "description": "Sets the hover text formatting rule for data values on this axis, using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "linecolor": { + "description": "Sets the axis line color.", "dflt": "#444", "role": "style", "valType": "color" }, - "borderwidth": { - "description": "Sets the width (in px) of the border enclosing the range selector.", - "dflt": 0, + "linewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, "min": 0, "role": "style", "valType": "number" }, - "buttons": { - "items": { - "button": { - "count": { - "description": "Sets the number of steps to take to update the range. Use with `step` to specify the update interval.", - "dflt": 1, - "min": 0, - "role": "info", - "valType": "number" - }, - "description": "Sets the specifications for each buttons. By default, a range selector comes with no buttons.", - "label": { - "description": "Sets the text label to appear on the button.", - "role": "info", - "valType": "string" - }, - "role": "object", - "step": { - "description": "The unit of measurement that the `count` value will set the range by.", - "dflt": "month", - "role": "info", - "valType": "enumerated", - "values": [ - "month", - "year", - "day", - "hour", - "minute", - "second", - "all" - ] - }, - "stepmode": { - "description": "Sets the range update mode. If *backward*, the range update shifts the start of range back *count* times *step* milliseconds. If *todate*, the range update shifts the start of range back to the first timestamp from *count* times *step* milliseconds back. For example, with `step` set to *year* and `count` set to *1* the range update shifts the start of the range back to January 01 of the current year.", - "dflt": "backward", - "role": "info", - "valType": "enumerated", - "values": [ - "backward", - "todate" - ] - } - } - }, - "role": "object" + "min": { + "description": "The minimum value visible on this axis. The maximum is determined by the sum minus the minimum values of the other two axes. The full view corresponds to all the minima set to zero.", + "dflt": 0, + "min": 0, + "role": "info", + "valType": "number" }, - "font": { + "nticks": { + "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 6, + "min": 1, + "role": "style", + "valType": "integer" + }, + "role": "object", + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showgrid": { + "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showline": { + "description": "Determines whether or not a line bounding this axis is drawn.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", + "dflt": 0, + "role": "style", + "valType": "number" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "role": "style", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "tickfont": { "color": { "role": "style", "valType": "color" }, - "description": "Sets the font of the range selector button text.", + "description": "Sets the tick font.", "family": { "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", "noBlank": true, @@ -3386,399 +3309,1492 @@ "valType": "number" } }, - "role": "object", - "visible": { - "description": "Determines whether or not this range selector is visible. Note that range selectors are only available for x axes of `type` set to or auto-typed to *date*.", - "role": "info", - "valType": "boolean" + "tickformat": { + "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" }, - "x": { - "description": "Sets the x position (in normalized coordinates) of the range selector.", - "max": 3, - "min": -2, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "min": 0, "role": "style", "valType": "number" }, - "xanchor": { - "description": "Sets the range selector's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the range selector.", - "dflt": "left", + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", "role": "info", "valType": "enumerated", "values": [ "auto", - "left", - "center", - "right" + "linear", + "array" ] }, - "y": { - "description": "Sets the y position (in normalized coordinates) of the range selector.", - "max": 3, - "min": -2, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", "role": "style", - "valType": "number" + "valType": "string" }, - "yanchor": { - "description": "Sets the range selector's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the range selector.", - "dflt": "bottom", - "role": "info", + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "role": "style", "valType": "enumerated", "values": [ - "auto", - "top", - "middle", - "bottom" + "outside", + "inside", + "" ] - } - }, - "rangeslider": { - "bgcolor": { - "description": "Sets the background color of the range slider.", - "dflt": "#fff", - "role": "style", - "valType": "color" }, - "bordercolor": { - "description": "Sets the border color of the range slider.", - "dflt": "#444", + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", "role": "style", - "valType": "color" + "valType": "string" }, - "borderwidth": { - "description": "Sets the border color of the range slider.", - "dflt": 0, - "min": 0, - "role": "style", - "valType": "integer" + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" }, - "role": "object", - "thickness": { - "description": "The height of the range slider as a fraction of the total plot area height.", - "dflt": 0.15, - "max": 1, + "ticktextsrc": { + "description": "Sets the source reference on plot.ly for ticktext .", + "role": "info", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on plot.ly for tickvals .", + "role": "info", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, "min": 0, "role": "style", "valType": "number" }, - "visible": { - "description": "Determines whether or not the range slider will be visible. If visible, perpendicular axes will be set to `fixedrange`", - "dflt": true, + "title": { + "description": "Sets the title of this axis.", "role": "info", - "valType": "boolean" + "valType": "string" + }, + "titlefont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets this axis' title font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } } }, - "role": "object", - "showexponent": { - "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", - "dflt": "all", - "role": "style", - "valType": "enumerated", - "values": [ - "all", - "first", - "last", - "none" - ] + "domain": { + "role": "object", + "x": { + "description": "Sets the horizontal domain of this subplot (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "items": [ + { + "max": 1, + "min": 0, + "valType": "number" + }, + { + "max": 1, + "min": 0, + "valType": "number" + } + ], + "role": "info", + "valType": "info_array" + }, + "y": { + "description": "Sets the vertical domain of this subplot (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "items": [ + { + "max": 1, + "min": 0, + "valType": "number" + }, + { + "max": 1, + "min": 0, + "valType": "number" + } + ], + "role": "info", + "valType": "info_array" + } }, - "showgrid": { - "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "role": "object", + "sum": { + "description": "The number each triplet should sum to, and the maximum range of each axis", + "dflt": 1, + "min": 0, + "role": "info", + "valType": "number" + } + }, + "title": { + "description": "Sets the plot's title.", + "dflt": "Click to enter Plot title", + "role": "info", + "valType": "string" + }, + "titlefont": { + "color": { "role": "style", - "valType": "boolean" + "valType": "color" }, - "showline": { - "description": "Determines whether or not a line bounding this axis is drawn.", - "dflt": false, + "description": "Sets the title font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, "role": "style", - "valType": "boolean" + "strict": true, + "valType": "string" }, - "showticklabels": { - "description": "Determines whether or not the tick labels are drawn.", - "dflt": true, + "role": "object", + "size": { + "min": 1, "role": "style", - "valType": "boolean" + "valType": "number" + } + }, + "width": { + "description": "Sets the plot's width (in px).", + "dflt": 700, + "min": 10, + "role": "info", + "valType": "number" + }, + "xaxis": { + "_deprecated": { + "autotick": { + "description": "Obsolete. Set `tickmode` to *auto* for old `autotick` *true* behavior. Set `tickmode` to *linear* for `autotick` *false*.", + "role": "info", + "valType": "boolean" + } }, - "showtickprefix": { - "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", - "dflt": "all", - "role": "style", + "_isSubplotObj": true, + "anchor": { + "description": "If set to an opposite-letter axis id (e.g. `xaxis2`, `yaxis`), this axis is bound to the corresponding opposite-letter axis. If set to *free*, this axis' position is determined by `position`.", + "role": "info", "valType": "enumerated", "values": [ - "all", - "first", - "last", - "none" + "free", + "/^x([2-9]|[1-9][0-9]+)?$/", + "/^y([2-9]|[1-9][0-9]+)?$/" ] }, - "showticksuffix": { - "description": "Same as `showtickprefix` but for tick suffixes.", - "dflt": "all", + "autorange": { + "description": "Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided, then `autorange` is set to *false*.", + "dflt": true, "role": "style", "valType": "enumerated", "values": [ - "all", - "first", - "last", - "none" + true, + false, + "reversed" ] }, - "side": { - "description": "Determines whether a x (y) axis is positioned at the *bottom* (*left*) or *top* (*right*) of the plotting area.", + "categoryarray": { + "description": "Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to *array*. Used with `categoryorder`.", + "role": "data", + "valType": "data_array" + }, + "categoryarraysrc": { + "description": "Sets the source reference on plot.ly for categoryarray .", + "role": "info", + "valType": "string" + }, + "categoryorder": { + "description": "Specifies the ordering logic for the case of categorical variables. By default, plotly uses *trace*, which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.", + "dflt": "trace", "role": "info", "valType": "enumerated", "values": [ - "top", - "bottom", - "left", - "right" + "trace", + "category ascending", + "category descending", + "array" ] }, - "tick0": { - "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", - "dflt": 0, + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", "role": "style", - "valType": "number" + "valType": "color" }, - "tickangle": { - "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", - "dflt": "auto", + "domain": { + "description": "Sets the domain of this axis (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "items": [ + { + "max": 1, + "min": 0, + "valType": "number" + }, + { + "max": 1, + "min": 0, + "valType": "number" + } + ], + "role": "info", + "valType": "info_array" + }, + "dtick": { + "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", + "dflt": 1, "role": "style", - "valType": "angle" + "valType": "any" }, - "tickcolor": { - "description": "Sets the tick color.", - "dflt": "#444", + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", "role": "style", - "valType": "color" + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] }, - "tickfont": { - "color": { - "role": "style", - "valType": "color" - }, - "description": "Sets the tick font.", - "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", - "noBlank": true, - "role": "style", - "strict": true, - "valType": "string" - }, - "role": "object", - "size": { - "min": 1, - "role": "style", - "valType": "number" - } + "fixedrange": { + "description": "Determines whether or not this axis is zoom-able. If true, then zoom is disabled.", + "dflt": false, + "role": "info", + "valType": "boolean" }, - "tickformat": { - "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", - "dflt": "", + "gridcolor": { + "description": "Sets the color of the grid lines.", + "dflt": "#eee", "role": "style", - "valType": "string" + "valType": "color" }, - "ticklen": { - "description": "Sets the tick length (in px).", - "dflt": 5, + "gridwidth": { + "description": "Sets the width (in px) of the grid lines.", + "dflt": 1, "min": 0, "role": "style", "valType": "number" }, - "tickmode": { - "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", - "role": "info", - "valType": "enumerated", - "values": [ - "auto", - "linear", - "array" - ] - }, - "tickprefix": { - "description": "Sets a tick label prefix.", + "hoverformat": { + "description": "Sets the hover text formatting rule for data values on this axis, using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", "dflt": "", "role": "style", "valType": "string" }, - "ticks": { - "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "linecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", "role": "style", - "valType": "enumerated", - "values": [ - "outside", - "inside", - "" - ] - }, - "ticksuffix": { - "description": "Sets a tick label suffix.", - "dflt": "", - "role": "style", - "valType": "string" - }, - "ticktext": { - "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", - "role": "data", - "valType": "data_array" - }, - "ticktextsrc": { - "description": "Sets the source reference on plot.ly for ticktext .", - "role": "info", - "valType": "string" - }, - "tickvals": { - "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", - "role": "data", - "valType": "data_array" - }, - "tickvalssrc": { - "description": "Sets the source reference on plot.ly for tickvals .", - "role": "info", - "valType": "string" + "valType": "color" }, - "tickwidth": { - "description": "Sets the tick width (in px).", + "linewidth": { + "description": "Sets the width (in px) of the axis line.", "dflt": 1, "min": 0, "role": "style", "valType": "number" }, - "title": { - "description": "Sets the title of this axis.", - "role": "info", - "valType": "string" - }, - "titlefont": { - "color": { - "role": "style", - "valType": "color" - }, - "description": "Sets this axis' title font.", - "family": { - "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", - "noBlank": true, - "role": "style", - "strict": true, - "valType": "string" - }, - "role": "object", - "size": { - "min": 1, - "role": "style", - "valType": "number" - } - }, - "type": { - "description": "Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question.", - "dflt": "-", - "role": "info", + "mirror": { + "description": "Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If *true*, the axis lines are mirrored. If *ticks*, the axis lines and ticks are mirrored. If *false*, mirroring is disable. If *all*, axis lines are mirrored on all shared-axes subplots. If *allticks*, axis lines and ticks are mirrored on all shared-axes subplots.", + "dflt": false, + "role": "style", "valType": "enumerated", "values": [ - "-", - "linear", - "log", - "date", - "category" + true, + "ticks", + false, + "all", + "allticks" ] }, - "zeroline": { - "description": "Determines whether or not a line is drawn at along the 0 value of this axis. If *true*, the zero line is drawn on top of the grid lines.", + "nticks": { + "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 0, + "min": 0, "role": "style", - "valType": "boolean" + "valType": "integer" }, - "zerolinecolor": { - "description": "Sets the line color of the zero line.", - "dflt": "#444", - "role": "style", - "valType": "color" + "overlaying": { + "description": "If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis. If *false*, this axis does not overlay any same-letter axes.", + "role": "info", + "valType": "enumerated", + "values": [ + "free", + "/^x([2-9]|[1-9][0-9]+)?$/", + "/^y([2-9]|[1-9][0-9]+)?$/" + ] }, - "zerolinewidth": { - "description": "Sets the width (in px) of the zero line.", - "dflt": 1, + "position": { + "description": "Sets the position of this axis in the plotting space (in normalized coordinates). Only has an effect if `anchor` is set to *free*.", + "dflt": 0, + "max": 1, + "min": 0, "role": "style", "valType": "number" - } - } - } - }, - "traces": { - "area": { - "attributes": { - "hoverinfo": { - "description": "Determines which trace information appear on hover.", - "dflt": "all", - "extras": [ - "all", - "none" - ], - "flags": [ - "x", - "y", - "z", - "text", - "name" + }, + "range": { + "description": "Sets the range of this axis. If the axis `type` is *log*, then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the date range from January 1st 1970 to November 4th, 2013, set the range from 0 to 1380844800000.0", + "items": [ + { + "valType": "number" + }, + { + "valType": "number" + } ], "role": "info", - "valType": "flaglist" + "valType": "info_array" }, - "legendgroup": { - "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", - "dflt": "", - "role": "info", - "valType": "string" + "rangemode": { + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", + "dflt": "normal", + "role": "style", + "valType": "enumerated", + "values": [ + "normal", + "tozero", + "nonnegative" + ] }, - "marker": { - "color": { - "arrayOk": true, - "description": "Sets the marker color. It accepts either a specific color or an array of values that are mapped to the colorscale relative to the max and min values of the array or relative to `cmin` and `cmax` if set.", + "rangeselector": { + "bgcolor": { + "description": "Sets the background color of the range selector buttons.", + "dflt": "#eee", "role": "style", "valType": "color" }, - "colorsrc": { - "description": "Sets the source reference on plot.ly for color .", - "role": "info", - "valType": "string" - }, - "opacity": { - "arrayOk": true, - "description": "Sets the marker opacity.", - "max": 1, - "min": 0, + "bordercolor": { + "description": "Sets the color of the border enclosing the range selector.", + "dflt": "#444", "role": "style", - "valType": "number" - }, - "opacitysrc": { - "description": "Sets the source reference on plot.ly for opacity .", - "role": "info", - "valType": "string" + "valType": "color" }, - "role": "object", - "size": { - "arrayOk": true, - "description": "Sets the marker size (in px).", - "dflt": 6, + "borderwidth": { + "description": "Sets the width (in px) of the border enclosing the range selector.", + "dflt": 0, "min": 0, "role": "style", "valType": "number" }, - "sizesrc": { - "description": "Sets the source reference on plot.ly for size .", - "role": "info", - "valType": "string" + "buttons": { + "items": { + "button": { + "count": { + "description": "Sets the number of steps to take to update the range. Use with `step` to specify the update interval.", + "dflt": 1, + "min": 0, + "role": "info", + "valType": "number" + }, + "description": "Sets the specifications for each buttons. By default, a range selector comes with no buttons.", + "label": { + "description": "Sets the text label to appear on the button.", + "role": "info", + "valType": "string" + }, + "role": "object", + "step": { + "description": "The unit of measurement that the `count` value will set the range by.", + "dflt": "month", + "role": "info", + "valType": "enumerated", + "values": [ + "month", + "year", + "day", + "hour", + "minute", + "second", + "all" + ] + }, + "stepmode": { + "description": "Sets the range update mode. If *backward*, the range update shifts the start of range back *count* times *step* milliseconds. If *todate*, the range update shifts the start of range back to the first timestamp from *count* times *step* milliseconds back. For example, with `step` set to *year* and `count` set to *1* the range update shifts the start of the range back to January 01 of the current year.", + "dflt": "backward", + "role": "info", + "valType": "enumerated", + "values": [ + "backward", + "todate" + ] + } + } + }, + "role": "object" }, - "symbol": { - "arrayOk": true, - "description": "Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.", - "dflt": "circle", - "role": "style", - "valType": "enumerated", - "values": [ - 0, - "circle", - 100, - "circle-open", - 200, - "circle-dot", - 300, + "font": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets the font of the range selector button text.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "role": "object", + "visible": { + "description": "Determines whether or not this range selector is visible. Note that range selectors are only available for x axes of `type` set to or auto-typed to *date*.", + "role": "info", + "valType": "boolean" + }, + "x": { + "description": "Sets the x position (in normalized coordinates) of the range selector.", + "max": 3, + "min": -2, + "role": "style", + "valType": "number" + }, + "xanchor": { + "description": "Sets the range selector's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the range selector.", + "dflt": "left", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "left", + "center", + "right" + ] + }, + "y": { + "description": "Sets the y position (in normalized coordinates) of the range selector.", + "max": 3, + "min": -2, + "role": "style", + "valType": "number" + }, + "yanchor": { + "description": "Sets the range selector's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the range selector.", + "dflt": "bottom", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "top", + "middle", + "bottom" + ] + } + }, + "rangeslider": { + "bgcolor": { + "description": "Sets the background color of the range slider.", + "dflt": "#fff", + "role": "style", + "valType": "color" + }, + "bordercolor": { + "description": "Sets the border color of the range slider.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "borderwidth": { + "description": "Sets the border color of the range slider.", + "dflt": 0, + "min": 0, + "role": "style", + "valType": "integer" + }, + "range": { + "description": "Sets the range of the range slider. If not set, defaults to the full xaxis range. If the axis `type` is *log*, then you must take the log of your desired range. If the axis `type` is *date*, then you must convert the date to unix time in milliseconds.", + "items": [ + { + "valType": "number" + }, + { + "valType": "number" + } + ], + "role": "info", + "valType": "info_array" + }, + "role": "object", + "thickness": { + "description": "The height of the range slider as a fraction of the total plot area height.", + "dflt": 0.15, + "max": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "visible": { + "description": "Determines whether or not the range slider will be visible. If visible, perpendicular axes will be set to `fixedrange`", + "dflt": true, + "role": "info", + "valType": "boolean" + } + }, + "role": "object", + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showgrid": { + "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "role": "style", + "valType": "boolean" + }, + "showline": { + "description": "Determines whether or not a line bounding this axis is drawn.", + "dflt": false, + "role": "style", + "valType": "boolean" + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "side": { + "description": "Determines whether a x (y) axis is positioned at the *bottom* (*left*) or *top* (*right*) of the plotting area.", + "role": "info", + "valType": "enumerated", + "values": [ + "top", + "bottom", + "left", + "right" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", + "dflt": 0, + "role": "style", + "valType": "number" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "role": "style", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "tickfont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets the tick font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "tickformat": { + "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "min": 0, + "role": "style", + "valType": "number" + }, + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ] + }, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "role": "style", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on plot.ly for ticktext .", + "role": "info", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on plot.ly for tickvals .", + "role": "info", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "title": { + "description": "Sets the title of this axis.", + "role": "info", + "valType": "string" + }, + "titlefont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets this axis' title font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "type": { + "description": "Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question.", + "dflt": "-", + "role": "info", + "valType": "enumerated", + "values": [ + "-", + "linear", + "log", + "date", + "category" + ] + }, + "zeroline": { + "description": "Determines whether or not a line is drawn at along the 0 value of this axis. If *true*, the zero line is drawn on top of the grid lines.", + "role": "style", + "valType": "boolean" + }, + "zerolinecolor": { + "description": "Sets the line color of the zero line.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "zerolinewidth": { + "description": "Sets the width (in px) of the zero line.", + "dflt": 1, + "role": "style", + "valType": "number" + } + }, + "yaxis": { + "_deprecated": { + "autotick": { + "description": "Obsolete. Set `tickmode` to *auto* for old `autotick` *true* behavior. Set `tickmode` to *linear* for `autotick` *false*.", + "role": "info", + "valType": "boolean" + } + }, + "_isSubplotObj": true, + "anchor": { + "description": "If set to an opposite-letter axis id (e.g. `xaxis2`, `yaxis`), this axis is bound to the corresponding opposite-letter axis. If set to *free*, this axis' position is determined by `position`.", + "role": "info", + "valType": "enumerated", + "values": [ + "free", + "/^x([2-9]|[1-9][0-9]+)?$/", + "/^y([2-9]|[1-9][0-9]+)?$/" + ] + }, + "autorange": { + "description": "Determines whether or not the range of this axis is computed in relation to the input data. See `rangemode` for more info. If `range` is provided, then `autorange` is set to *false*.", + "dflt": true, + "role": "style", + "valType": "enumerated", + "values": [ + true, + false, + "reversed" + ] + }, + "categoryarray": { + "description": "Sets the order in which categories on this axis appear. Only has an effect if `categoryorder` is set to *array*. Used with `categoryorder`.", + "role": "data", + "valType": "data_array" + }, + "categoryarraysrc": { + "description": "Sets the source reference on plot.ly for categoryarray .", + "role": "info", + "valType": "string" + }, + "categoryorder": { + "description": "Specifies the ordering logic for the case of categorical variables. By default, plotly uses *trace*, which specifies the order that is present in the data supplied. Set `categoryorder` to *category ascending* or *category descending* if order should be determined by the alphanumerical order of the category names. Set `categoryorder` to *array* to derive the ordering from the attribute `categoryarray`. If a category is not found in the `categoryarray` array, the sorting behavior for that attribute will be identical to the *trace* mode. The unspecified categories will follow the categories in `categoryarray`.", + "dflt": "trace", + "role": "info", + "valType": "enumerated", + "values": [ + "trace", + "category ascending", + "category descending", + "array" + ] + }, + "color": { + "description": "Sets default for all colors associated with this axis all at once: line, font, tick, and grid colors. Grid color is lightened by blending this with the plot background Individual pieces can override this.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "domain": { + "description": "Sets the domain of this axis (in plot fraction).", + "dflt": [ + 0, + 1 + ], + "items": [ + { + "max": 1, + "min": 0, + "valType": "number" + }, + { + "max": 1, + "min": 0, + "valType": "number" + } + ], + "role": "info", + "valType": "info_array" + }, + "dtick": { + "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", + "dflt": 1, + "role": "style", + "valType": "any" + }, + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "role": "style", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] + }, + "fixedrange": { + "description": "Determines whether or not this axis is zoom-able. If true, then zoom is disabled.", + "dflt": false, + "role": "info", + "valType": "boolean" + }, + "gridcolor": { + "description": "Sets the color of the grid lines.", + "dflt": "#eee", + "role": "style", + "valType": "color" + }, + "gridwidth": { + "description": "Sets the width (in px) of the grid lines.", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "hoverformat": { + "description": "Sets the hover text formatting rule for data values on this axis, using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "linecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "linewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "mirror": { + "description": "Determines if the axis lines or/and ticks are mirrored to the opposite side of the plotting area. If *true*, the axis lines are mirrored. If *ticks*, the axis lines and ticks are mirrored. If *false*, mirroring is disable. If *all*, axis lines are mirrored on all shared-axes subplots. If *allticks*, axis lines and ticks are mirrored on all shared-axes subplots.", + "dflt": false, + "role": "style", + "valType": "enumerated", + "values": [ + true, + "ticks", + false, + "all", + "allticks" + ] + }, + "nticks": { + "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 0, + "min": 0, + "role": "style", + "valType": "integer" + }, + "overlaying": { + "description": "If set a same-letter axis id, this axis is overlaid on top of the corresponding same-letter axis. If *false*, this axis does not overlay any same-letter axes.", + "role": "info", + "valType": "enumerated", + "values": [ + "free", + "/^x([2-9]|[1-9][0-9]+)?$/", + "/^y([2-9]|[1-9][0-9]+)?$/" + ] + }, + "position": { + "description": "Sets the position of this axis in the plotting space (in normalized coordinates). Only has an effect if `anchor` is set to *free*.", + "dflt": 0, + "max": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "range": { + "description": "Sets the range of this axis. If the axis `type` is *log*, then you must take the log of your desired range (e.g. to set the range from 1 to 100, set the range from 0 to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the date range from January 1st 1970 to November 4th, 2013, set the range from 0 to 1380844800000.0", + "items": [ + { + "valType": "number" + }, + { + "valType": "number" + } + ], + "role": "info", + "valType": "info_array" + }, + "rangemode": { + "description": "If *normal*, the range is computed in relation to the extrema of the input data. If *tozero*`, the range extends to 0, regardless of the input data If *nonnegative*, the range is non-negative, regardless of the input data.", + "dflt": "normal", + "role": "style", + "valType": "enumerated", + "values": [ + "normal", + "tozero", + "nonnegative" + ] + }, + "rangeselector": { + "bgcolor": { + "description": "Sets the background color of the range selector buttons.", + "dflt": "#eee", + "role": "style", + "valType": "color" + }, + "bordercolor": { + "description": "Sets the color of the border enclosing the range selector.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "borderwidth": { + "description": "Sets the width (in px) of the border enclosing the range selector.", + "dflt": 0, + "min": 0, + "role": "style", + "valType": "number" + }, + "buttons": { + "items": { + "button": { + "count": { + "description": "Sets the number of steps to take to update the range. Use with `step` to specify the update interval.", + "dflt": 1, + "min": 0, + "role": "info", + "valType": "number" + }, + "description": "Sets the specifications for each buttons. By default, a range selector comes with no buttons.", + "label": { + "description": "Sets the text label to appear on the button.", + "role": "info", + "valType": "string" + }, + "role": "object", + "step": { + "description": "The unit of measurement that the `count` value will set the range by.", + "dflt": "month", + "role": "info", + "valType": "enumerated", + "values": [ + "month", + "year", + "day", + "hour", + "minute", + "second", + "all" + ] + }, + "stepmode": { + "description": "Sets the range update mode. If *backward*, the range update shifts the start of range back *count* times *step* milliseconds. If *todate*, the range update shifts the start of range back to the first timestamp from *count* times *step* milliseconds back. For example, with `step` set to *year* and `count` set to *1* the range update shifts the start of the range back to January 01 of the current year.", + "dflt": "backward", + "role": "info", + "valType": "enumerated", + "values": [ + "backward", + "todate" + ] + } + } + }, + "role": "object" + }, + "font": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets the font of the range selector button text.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "role": "object", + "visible": { + "description": "Determines whether or not this range selector is visible. Note that range selectors are only available for x axes of `type` set to or auto-typed to *date*.", + "role": "info", + "valType": "boolean" + }, + "x": { + "description": "Sets the x position (in normalized coordinates) of the range selector.", + "max": 3, + "min": -2, + "role": "style", + "valType": "number" + }, + "xanchor": { + "description": "Sets the range selector's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the range selector.", + "dflt": "left", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "left", + "center", + "right" + ] + }, + "y": { + "description": "Sets the y position (in normalized coordinates) of the range selector.", + "max": 3, + "min": -2, + "role": "style", + "valType": "number" + }, + "yanchor": { + "description": "Sets the range selector's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the range selector.", + "dflt": "bottom", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "top", + "middle", + "bottom" + ] + } + }, + "rangeslider": { + "bgcolor": { + "description": "Sets the background color of the range slider.", + "dflt": "#fff", + "role": "style", + "valType": "color" + }, + "bordercolor": { + "description": "Sets the border color of the range slider.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "borderwidth": { + "description": "Sets the border color of the range slider.", + "dflt": 0, + "min": 0, + "role": "style", + "valType": "integer" + }, + "range": { + "description": "Sets the range of the range slider. If not set, defaults to the full xaxis range. If the axis `type` is *log*, then you must take the log of your desired range. If the axis `type` is *date*, then you must convert the date to unix time in milliseconds.", + "items": [ + { + "valType": "number" + }, + { + "valType": "number" + } + ], + "role": "info", + "valType": "info_array" + }, + "role": "object", + "thickness": { + "description": "The height of the range slider as a fraction of the total plot area height.", + "dflt": 0.15, + "max": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "visible": { + "description": "Determines whether or not the range slider will be visible. If visible, perpendicular axes will be set to `fixedrange`", + "dflt": true, + "role": "info", + "valType": "boolean" + } + }, + "role": "object", + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showgrid": { + "description": "Determines whether or not grid lines are drawn. If *true*, the grid lines are drawn at every tick mark.", + "role": "style", + "valType": "boolean" + }, + "showline": { + "description": "Determines whether or not a line bounding this axis is drawn.", + "dflt": false, + "role": "style", + "valType": "boolean" + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "side": { + "description": "Determines whether a x (y) axis is positioned at the *bottom* (*left*) or *top* (*right*) of the plotting area.", + "role": "info", + "valType": "enumerated", + "values": [ + "top", + "bottom", + "left", + "right" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", + "dflt": 0, + "role": "style", + "valType": "number" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "role": "style", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "tickfont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets the tick font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "tickformat": { + "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "min": 0, + "role": "style", + "valType": "number" + }, + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ] + }, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "role": "style", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on plot.ly for ticktext .", + "role": "info", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on plot.ly for tickvals .", + "role": "info", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "title": { + "description": "Sets the title of this axis.", + "role": "info", + "valType": "string" + }, + "titlefont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets this axis' title font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "type": { + "description": "Sets the axis type. By default, plotly attempts to determined the axis type by looking into the data of the traces that referenced the axis in question.", + "dflt": "-", + "role": "info", + "valType": "enumerated", + "values": [ + "-", + "linear", + "log", + "date", + "category" + ] + }, + "zeroline": { + "description": "Determines whether or not a line is drawn at along the 0 value of this axis. If *true*, the zero line is drawn on top of the grid lines.", + "role": "style", + "valType": "boolean" + }, + "zerolinecolor": { + "description": "Sets the line color of the zero line.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "zerolinewidth": { + "description": "Sets the width (in px) of the zero line.", + "dflt": 1, + "role": "style", + "valType": "number" + } + } + } + }, + "traces": { + "area": { + "attributes": { + "hoverinfo": { + "description": "Determines which trace information appear on hover.", + "dflt": "all", + "extras": [ + "all", + "none" + ], + "flags": [ + "x", + "y", + "z", + "text", + "name" + ], + "role": "info", + "valType": "flaglist" + }, + "legendgroup": { + "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "dflt": "", + "role": "info", + "valType": "string" + }, + "marker": { + "color": { + "arrayOk": true, + "description": "Sets the marker color. It accepts either a specific color or an array of values that are mapped to the colorscale relative to the max and min values of the array or relative to `cmin` and `cmax` if set.", + "role": "style", + "valType": "color" + }, + "colorsrc": { + "description": "Sets the source reference on plot.ly for color .", + "role": "info", + "valType": "string" + }, + "opacity": { + "arrayOk": true, + "description": "Sets the marker opacity.", + "max": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "opacitysrc": { + "description": "Sets the source reference on plot.ly for opacity .", + "role": "info", + "valType": "string" + }, + "role": "object", + "size": { + "arrayOk": true, + "description": "Sets the marker size (in px).", + "dflt": 6, + "min": 0, + "role": "style", + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on plot.ly for size .", + "role": "info", + "valType": "string" + }, + "symbol": { + "arrayOk": true, + "description": "Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.", + "dflt": "circle", + "role": "style", + "valType": "enumerated", + "values": [ + 0, + "circle", + 100, + "circle-open", + 200, + "circle-dot", + 300, "circle-open-dot", 1, "square", @@ -4394,25 +5410,25 @@ }, "marker": { "autocolorscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -4773,25 +5789,25 @@ }, "line": { "autocolorscale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -4813,7 +5829,7 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" @@ -4833,14 +5849,14 @@ } }, "reversescale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" }, "role": "object", "showscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", "dflt": false, "role": "info", "valType": "boolean" @@ -4954,7 +5970,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xsrc": { "description": "Sets the source reference on plot.ly for x .", @@ -4976,7 +5992,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ysrc": { "description": "Sets the source reference on plot.ly for y .", @@ -5051,7 +6067,7 @@ ] }, "fillcolor": { - "description": "Sets the fill color.", + "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", "role": "style", "valType": "color" }, @@ -5545,7 +6561,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xsrc": { "description": "Sets the source reference on plot.ly for x .", @@ -5566,7 +6582,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ysrc": { "description": "Sets the source reference on plot.ly for y .", @@ -5959,7 +6975,7 @@ "description": "Sets a reference between this trace's geospatial coordinates and a geographic map. If *geo* (the default value), the geospatial coordinates refer to `layout.geo`. If *geo2*, the geospatial coordinates refer to `layout.geo2`, and so on.", "dflt": "geo", "role": "info", - "valType": "geoid" + "valType": "subplotid" }, "hoverinfo": { "description": "Determines which trace information appear on hover.", @@ -6713,7 +7729,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xsrc": { "description": "Sets the source reference on plot.ly for x .", @@ -6744,7 +7760,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ysrc": { "description": "Sets the source reference on plot.ly for y .", @@ -7278,7 +8294,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xsrc": { "description": "Sets the source reference on plot.ly for x .", @@ -7309,7 +8325,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ysrc": { "description": "Sets the source reference on plot.ly for y .", @@ -7649,25 +8665,25 @@ }, "marker": { "autocolorscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -8028,25 +9044,25 @@ }, "line": { "autocolorscale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -8068,7 +9084,7 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" @@ -8089,14 +9105,14 @@ } }, "reversescale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" }, "role": "object", "showscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", "dflt": false, "role": "info", "valType": "boolean" @@ -8198,7 +9214,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xbins": { "end": { @@ -8235,7 +9251,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ybins": { "end": { @@ -8817,7 +9833,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xbins": { "end": { @@ -8854,7 +9870,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ybins": { "end": { @@ -9525,7 +10541,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xbins": { "end": { @@ -9562,7 +10578,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ybins": { "end": { @@ -9980,7 +10996,8 @@ }, "contour": { "color": { - "dflt": "#000", + "description": "Sets the color of the contour lines.", + "dflt": "#444", "role": "style", "valType": "color" }, @@ -9992,6 +11009,7 @@ "valType": "boolean" }, "width": { + "description": "Sets the width of the contour lines.", "dflt": 2, "max": 16, "min": 1, @@ -10133,6 +11151,7 @@ "valType": "string" }, "opacity": { + "description": "Sets the opacity of the surface.", "dflt": 1, "max": 1, "min": 0, @@ -10149,7 +11168,7 @@ "description": "Sets a reference between this trace's 3D coordinate system and a 3D scene. If *scene* (the default value), the (x,y,z) coordinates refer to `layout.scene`. If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`, and so on.", "dflt": "scene", "role": "info", - "valType": "sceneid" + "valType": "subplotid" }, "showlegend": { "description": "Determines whether or not an item corresponding to this trace is shown in the legend.", @@ -10829,7 +11848,7 @@ } }, "fill": { - "description": "Sets the area to fill with a solid color. Use with `fillcolor`.", + "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. *tozerox* and *tozeroy* fill to x=0 and y=0 respectively. *tonextx* and *tonexty* fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like *tozerox* and *tozeroy*. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other.", "dflt": "none", "role": "style", "valType": "enumerated", @@ -10838,11 +11857,13 @@ "tozeroy", "tozerox", "tonexty", - "tonextx" + "tonextx", + "toself", + "tonext" ] }, "fillcolor": { - "description": "Sets the fill color.", + "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", "role": "style", "valType": "color" }, @@ -10905,7 +11926,7 @@ ] }, "smoothing": { - "description": "Has only an effect if `shape` is set to *spline* Sets the amount of smoothing. *0* corresponds to no smoothing (equivalent to a *linear* shape).", + "description": "Has an effect only if `shape` is set to *spline* Sets the amount of smoothing. *0* corresponds to no smoothing (equivalent to a *linear* shape).", "dflt": 1, "max": 1.3, "min": 0, @@ -10922,25 +11943,25 @@ }, "marker": { "autocolorscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -11301,25 +12322,25 @@ }, "line": { "autocolorscale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -11341,7 +12362,7 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" @@ -11381,14 +12402,14 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" }, "role": "object", "showscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", "dflt": false, "role": "info", "valType": "boolean" @@ -11402,14 +12423,14 @@ "valType": "number" }, "sizemin": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", "dflt": 0, "min": 0, "role": "style", "valType": "number" }, "sizemode": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", "dflt": "diameter", "role": "info", "valType": "enumerated", @@ -11419,7 +12440,7 @@ ] }, "sizeref": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", "dflt": 1, "role": "style", "valType": "number" @@ -11900,7 +12921,7 @@ "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", "dflt": "x", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "xsrc": { "description": "Sets the source reference on plot.ly for x .", @@ -11922,7 +12943,7 @@ "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", "dflt": "y", "role": "info", - "valType": "axisid" + "valType": "subplotid" }, "ysrc": { "description": "Sets the source reference on plot.ly for y .", @@ -11930,7 +12951,7 @@ "valType": "string" } }, - "description": "The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts. The data visualized as scatter point or lines is set in `x` and `y`. Text (appearing either on the chart or on hover only) is via `text`. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to a numerical arrays." + "description": "The scatter trace type encompasses line charts, scatter charts, text charts, and bubble charts. The data visualized as scatter point or lines is set in `x` and `y`. Text (appearing either on the chart or on hover only) is via `text`. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to numerical arrays." }, "scatter3d": { "attributes": { @@ -12303,25 +13324,25 @@ }, "marker": { "autocolorscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -12682,25 +13703,25 @@ }, "line": { "autocolorscale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -12722,7 +13743,7 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" @@ -12745,14 +13766,14 @@ "valType": "number" }, "reversescale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" }, "role": "object", "showscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", "dflt": false, "role": "info", "valType": "boolean" @@ -12766,14 +13787,14 @@ "valType": "number" }, "sizemin": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", "dflt": 0, "min": 0, "role": "style", "valType": "number" }, "sizemode": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", "dflt": "diameter", "role": "info", "valType": "enumerated", @@ -12783,7 +13804,7 @@ ] }, "sizeref": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", "dflt": 1, "role": "style", "valType": "number" @@ -12925,7 +13946,7 @@ "description": "Sets a reference between this trace's 3D coordinate system and a 3D scene. If *scene* (the default value), the (x,y,z) coordinates refer to `layout.scene`. If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`, and so on.", "dflt": "scene", "role": "info", - "valType": "sceneid" + "valType": "subplotid" }, "showlegend": { "description": "Determines whether or not an item corresponding to this trace is shown in the legend.", @@ -13095,7 +14116,7 @@ "description": "Sets a reference between this trace's geospatial coordinates and a geographic map. If *geo* (the default value), the geospatial coordinates refer to `layout.geo`. If *geo2*, the geospatial coordinates refer to `layout.geo2`, and so on.", "dflt": "geo", "role": "info", - "valType": "geoid" + "valType": "subplotid" }, "hoverinfo": { "description": "Determines which trace information appear on hover.", @@ -13192,25 +14213,25 @@ }, "marker": { "autocolorscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -13571,25 +14592,25 @@ }, "line": { "autocolorscale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -13611,7 +14632,7 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" @@ -13644,14 +14665,14 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" }, "role": "object", "showscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", "dflt": false, "role": "info", "valType": "boolean" @@ -13665,14 +14686,14 @@ "valType": "number" }, "sizemin": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", "dflt": 0, "min": 0, "role": "style", "valType": "number" }, "sizemode": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", "dflt": "diameter", "role": "info", "valType": "enumerated", @@ -13682,7 +14703,7 @@ ] }, "sizeref": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", "dflt": 1, "role": "style", "valType": "number" @@ -13985,387 +15006,1141 @@ "line-nw-open" ] }, - "symbolsrc": { - "description": "Sets the source reference on plot.ly for symbol .", + "symbolsrc": { + "description": "Sets the source reference on plot.ly for symbol .", + "role": "info", + "valType": "string" + } + }, + "mode": { + "description": "Determines the drawing mode for this scatter trace. If the provided `mode` includes *text* then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover. If there are less than 20 points, then the default is *lines+markers*. Otherwise, *lines*.", + "dflt": "markers", + "extras": [ + "none" + ], + "flags": [ + "lines", + "markers", + "text" + ], + "role": "info", + "valType": "flaglist" + }, + "name": { + "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "role": "info", + "valType": "string" + }, + "opacity": { + "description": "Sets the opacity of the trace.", + "dflt": 1, + "max": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "showlegend": { + "description": "Determines whether or not an item corresponding to this trace is shown in the legend.", + "dflt": true, + "role": "info", + "valType": "boolean" + }, + "stream": { + "maxpoints": { + "description": "Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot.", + "min": 0, + "role": "info", + "valType": "number" + }, + "role": "object", + "token": { + "description": "The stream id number links a data trace on a plot with a stream. See https://plot.ly/settings for more details.", + "noBlank": true, + "role": "info", + "strict": true, + "valType": "string" + } + }, + "text": { + "arrayOk": true, + "description": "Sets text elements associated with each (lon,lat) pair or item in `locations`. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) or `locations` coordinates.", + "dflt": "", + "role": "info", + "valType": "string" + }, + "textfont": { + "color": { + "arrayOk": true, + "role": "style", + "valType": "color" + }, + "colorsrc": { + "description": "Sets the source reference on plot.ly for color .", + "role": "info", + "valType": "string" + }, + "description": "Sets the text font.", + "family": { + "arrayOk": true, + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "familysrc": { + "description": "Sets the source reference on plot.ly for family .", + "role": "info", + "valType": "string" + }, + "role": "object", + "size": { + "arrayOk": true, + "min": 1, + "role": "style", + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on plot.ly for size .", + "role": "info", + "valType": "string" + } + }, + "textposition": { + "arrayOk": true, + "description": "Sets the positions of the `text` elements with respects to the (x,y) coordinates.", + "dflt": "middle center", + "role": "style", + "valType": "enumerated", + "values": [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right" + ] + }, + "textpositionsrc": { + "description": "Sets the source reference on plot.ly for textposition .", + "role": "info", + "valType": "string" + }, + "textsrc": { + "description": "Sets the source reference on plot.ly for text .", + "role": "info", + "valType": "string" + }, + "type": "scattergeo", + "uid": { + "dflt": "", + "role": "info", + "valType": "string" + }, + "visible": { + "description": "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).", + "dflt": true, + "role": "info", + "valType": "enumerated", + "values": [ + true, + false, + "legendonly" + ] + } + }, + "description": "The data visualized as scatter point or lines on a geographic map is provided either by longitude/latitude pairs in `lon` and `lat` respectively or by geographic location IDs or names in `locations`.", + "hrName": "scatter_geo" + }, + "scattergl": { + "attributes": { + "dx": { + "description": "Sets the x coordinate step. See `x0` for more info.", + "dflt": 1, + "role": "info", + "valType": "number" + }, + "dy": { + "description": "Sets the y coordinate step. See `y0` for more info.", + "dflt": 1, + "role": "info", + "valType": "number" + }, + "error_x": { + "_deprecated": { + "opacity": { + "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", + "role": "style", + "valType": "number" + } + }, + "array": { + "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", + "role": "data", + "valType": "data_array" + }, + "arrayminus": { + "description": "Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data.", + "role": "data", + "valType": "data_array" + }, + "arrayminussrc": { + "description": "Sets the source reference on plot.ly for arrayminus .", + "role": "info", + "valType": "string" + }, + "arraysrc": { + "description": "Sets the source reference on plot.ly for array .", + "role": "info", + "valType": "string" + }, + "color": { + "description": "Sets the stoke color of the error bars.", + "role": "style", + "valType": "color" + }, + "copy_ystyle": { + "role": "style", + "valType": "boolean" + }, + "copy_zstyle": { + "role": "style", + "valType": "boolean" + }, + "role": "object", + "symmetric": { + "description": "Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars.", + "role": "info", + "valType": "boolean" + }, + "thickness": { + "description": "Sets the thickness (in px) of the error bars.", + "dflt": 2, + "min": 0, + "role": "style", + "valType": "number" + }, + "traceref": { + "dflt": 0, + "min": 0, + "role": "info", + "valType": "integer" + }, + "tracerefminus": { + "dflt": 0, + "min": 0, + "role": "info", + "valType": "integer" + }, + "type": { + "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the sqaure of the underlying data. If *array*, the bar lengths are set with data set `array`.", + "role": "info", + "valType": "enumerated", + "values": [ + "percent", + "constant", + "sqrt", + "data" + ] + }, + "value": { + "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars.", + "dflt": 10, + "min": 0, + "role": "info", + "valType": "number" + }, + "valueminus": { + "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars", + "dflt": 10, + "min": 0, + "role": "info", + "valType": "number" + }, + "visible": { + "description": "Determines whether or not this set of error bars is visible.", + "role": "info", + "valType": "boolean" + }, + "width": { + "description": "Sets the width (in px) of the cross-bar at both ends of the error bars.", + "min": 0, + "role": "style", + "valType": "number" + } + }, + "error_y": { + "_deprecated": { + "opacity": { + "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", + "role": "style", + "valType": "number" + } + }, + "array": { + "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", + "role": "data", + "valType": "data_array" + }, + "arrayminus": { + "description": "Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data.", + "role": "data", + "valType": "data_array" + }, + "arrayminussrc": { + "description": "Sets the source reference on plot.ly for arrayminus .", + "role": "info", + "valType": "string" + }, + "arraysrc": { + "description": "Sets the source reference on plot.ly for array .", "role": "info", "valType": "string" + }, + "color": { + "description": "Sets the stoke color of the error bars.", + "role": "style", + "valType": "color" + }, + "copy_ystyle": { + "role": "style", + "valType": "boolean" + }, + "copy_zstyle": { + "role": "style", + "valType": "boolean" + }, + "role": "object", + "symmetric": { + "description": "Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars.", + "role": "info", + "valType": "boolean" + }, + "thickness": { + "description": "Sets the thickness (in px) of the error bars.", + "dflt": 2, + "min": 0, + "role": "style", + "valType": "number" + }, + "traceref": { + "dflt": 0, + "min": 0, + "role": "info", + "valType": "integer" + }, + "tracerefminus": { + "dflt": 0, + "min": 0, + "role": "info", + "valType": "integer" + }, + "type": { + "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the sqaure of the underlying data. If *array*, the bar lengths are set with data set `array`.", + "role": "info", + "valType": "enumerated", + "values": [ + "percent", + "constant", + "sqrt", + "data" + ] + }, + "value": { + "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars.", + "dflt": 10, + "min": 0, + "role": "info", + "valType": "number" + }, + "valueminus": { + "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars", + "dflt": 10, + "min": 0, + "role": "info", + "valType": "number" + }, + "visible": { + "description": "Determines whether or not this set of error bars is visible.", + "role": "info", + "valType": "boolean" + }, + "width": { + "description": "Sets the width (in px) of the cross-bar at both ends of the error bars.", + "min": 0, + "role": "style", + "valType": "number" } }, - "mode": { - "description": "Determines the drawing mode for this scatter trace. If the provided `mode` includes *text* then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover. If there are less than 20 points, then the default is *lines+markers*. Otherwise, *lines*.", - "dflt": "markers", + "fill": { + "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. *tozerox* and *tozeroy* fill to x=0 and y=0 respectively. *tonextx* and *tonexty* fill between the endpoints of this trace and the endpoints of the trace before it, connecting those endpoints with straight lines (to make a stacked area graph); if there is no trace before it, they behave like *tozerox* and *tozeroy*. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other.", + "dflt": "none", + "role": "style", + "valType": "enumerated", + "values": [ + "none", + "tozeroy", + "tozerox" + ] + }, + "fillcolor": { + "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", + "role": "style", + "valType": "color" + }, + "hoverinfo": { + "description": "Determines which trace information appear on hover.", + "dflt": "all", "extras": [ + "all", "none" ], "flags": [ - "lines", - "markers", - "text" + "x", + "y", + "z", + "text", + "name" ], "role": "info", "valType": "flaglist" }, - "name": { - "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "legendgroup": { + "description": "Sets the legend group for this trace. Traces part of the same legend group hide/show at the same time when toggling legend items.", + "dflt": "", "role": "info", "valType": "string" }, - "opacity": { - "description": "Sets the opacity of the trace.", - "dflt": 1, - "max": 1, - "min": 0, - "role": "style", - "valType": "number" - }, - "showlegend": { - "description": "Determines whether or not an item corresponding to this trace is shown in the legend.", - "dflt": true, - "role": "info", - "valType": "boolean" - }, - "stream": { - "maxpoints": { - "description": "Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot.", + "line": { + "color": { + "description": "Sets the line color.", + "role": "style", + "valType": "color" + }, + "dash": { + "description": "Sets the style of the lines.", + "dflt": "solid", + "role": "style", + "valType": "enumerated", + "values": [ + "solid", + "dot", + "dash", + "longdash", + "dashdot", + "longdashdot" + ] + }, + "role": "object", + "width": { + "description": "Sets the line width (in px).", + "dflt": 2, "min": 0, + "role": "style", + "valType": "number" + } + }, + "marker": { + "autocolorscale": { + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "cauto": { + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "cmax": { + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", + "dflt": null, + "role": "info", + "valType": "number" + }, + "cmin": { + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", + "dflt": null, "role": "info", "valType": "number" }, - "role": "object", - "token": { - "description": "The stream id number links a data trace on a plot with a stream. See https://plot.ly/settings for more details.", - "noBlank": true, - "role": "info", - "strict": true, - "valType": "string" - } - }, - "text": { - "arrayOk": true, - "description": "Sets text elements associated with each (lon,lat) pair. or item in `locations`. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (lon,lat) or `locations` coordinates.", - "dflt": "", - "role": "info", - "valType": "string" - }, - "textfont": { - "color": { - "arrayOk": true, + "color": { + "arrayOk": true, + "description": "Sets the marker color. It accepts either a specific color or an array of values that are mapped to the colorscale relative to the max and min values of the array or relative to `cmin` and `cmax` if set.", + "role": "style", + "valType": "color" + }, + "colorbar": { + "bgcolor": { + "description": "Sets the color of padded area.", + "dflt": "rgba(0,0,0,0)", + "role": "style", + "valType": "color" + }, + "bordercolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "borderwidth": { + "description": "Sets the width (in px) or the border enclosing this color bar.", + "dflt": 0, + "min": 0, + "role": "style", + "valType": "number" + }, + "dtick": { + "description": "Sets the step in-between ticks on this axis Use with `tick0`. If the axis `type` is *log*, then ticks are set every 10^(n*dtick) where n is the tick number. For example, to set a tick mark at 1, 10, 100, 1000, ... set dtick to 1. To set tick marks at 1, 100, 10000, ... set dtick to 2. To set tick marks at 1, 5, 25, 125, 625, 3125, ... set dtick to log_10(5), or 0.69897000433. If the axis `type` is *date*, then you must convert the time to milliseconds. For example, to set the interval between ticks to one day, set `dtick` to 86400000.0.", + "dflt": 1, + "role": "style", + "valType": "any" + }, + "exponentformat": { + "description": "Determines a formatting rule for the tick exponents. For example, consider the number 1,000,000,000. If *none*, it appears as 1,000,000,000. If *e*, 1e+9. If *E*, 1E+9. If *power*, 1x10^9 (with 9 in a super script). If *SI*, 1G. If *B*, 1B.", + "dflt": "B", + "role": "style", + "valType": "enumerated", + "values": [ + "none", + "e", + "E", + "power", + "SI", + "B" + ] + }, + "len": { + "description": "Sets the length of the color bar This measure excludes the padding of both ends. That is, the color bar length is this length minus the padding on both ends.", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "lenmode": { + "description": "Determines whether this color bar's length (i.e. the measure in the color variation direction) is set in units of plot *fraction* or in *pixels. Use `len` to set the value.", + "dflt": "fraction", + "role": "info", + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ] + }, + "nticks": { + "description": "Sets the number of ticks. Has an effect only if `tickmode` is set to *auto*.", + "dflt": 0, + "min": 0, + "role": "style", + "valType": "integer" + }, + "outlinecolor": { + "description": "Sets the axis line color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "outlinewidth": { + "description": "Sets the width (in px) of the axis line.", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "role": "object", + "showexponent": { + "description": "If *all*, all exponents are shown besides their significands. If *first*, only the exponent of the first tick is shown. If *last*, only the exponent of the last tick is shown. If *none*, no exponents appear.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticklabels": { + "description": "Determines whether or not the tick labels are drawn.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "showtickprefix": { + "description": "If *all*, all tick labels are displayed with a prefix. If *first*, only the first tick is displayed with a prefix. If *last*, only the last tick is displayed with a suffix. If *none*, tick prefixes are hidden.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "showticksuffix": { + "description": "Same as `showtickprefix` but for tick suffixes.", + "dflt": "all", + "role": "style", + "valType": "enumerated", + "values": [ + "all", + "first", + "last", + "none" + ] + }, + "thickness": { + "description": "Sets the thickness of the color bar This measure excludes the size of the padding, ticks and labels.", + "dflt": 30, + "min": 0, + "role": "style", + "valType": "number" + }, + "thicknessmode": { + "description": "Determines whether this color bar's thickness (i.e. the measure in the constant color direction) is set in units of plot *fraction* or in *pixels*. Use `thickness` to set the value.", + "dflt": "pixels", + "role": "style", + "valType": "enumerated", + "values": [ + "fraction", + "pixels" + ] + }, + "tick0": { + "description": "Sets the placement of the first tick on this axis. Use with `dtick`. If the axis `type` is *log*, then you must take the log of your starting tick (e.g. to set the starting tick to 100, set the `tick0` to 2). If the axis `type` is *date*, then you must convert the date to unix time in milliseconds (the number of milliseconds since January 1st, 1970). For example, to set the starting tick to November 4th, 2013, set the range to 1380844800000.0.", + "dflt": 0, + "role": "style", + "valType": "number" + }, + "tickangle": { + "description": "Sets the angle of the tick labels with respect to the horizontal. For example, a `tickangle` of -90 draws the tick labels vertically.", + "dflt": "auto", + "role": "style", + "valType": "angle" + }, + "tickcolor": { + "description": "Sets the tick color.", + "dflt": "#444", + "role": "style", + "valType": "color" + }, + "tickfont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets the tick font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "tickformat": { + "description": "Sets the tick label formatting rule using the python/d3 number formatting language. See https://github.com/mbostock/d3/wiki/Formatting#numbers or https://docs.python.org/release/3.1.3/library/string.html#formatspec for more info.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticklen": { + "description": "Sets the tick length (in px).", + "dflt": 5, + "min": 0, + "role": "style", + "valType": "number" + }, + "tickmode": { + "description": "Sets the tick mode for this axis. If *auto*, the number of ticks is set via `nticks`. If *linear*, the placement of the ticks is determined by a starting position `tick0` and a tick step `dtick` (*linear* is the default value if `tick0` and `dtick` are provided). If *array*, the placement of the ticks is set via `tickvals` and the tick text is `ticktext`. (*array* is the default value if `tickvals` is provided).", + "role": "info", + "valType": "enumerated", + "values": [ + "auto", + "linear", + "array" + ] + }, + "tickprefix": { + "description": "Sets a tick label prefix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticks": { + "description": "Determines whether ticks are drawn or not. If **, this axis' ticks are not drawn. If *outside* (*inside*), this axis' are drawn outside (inside) the axis lines.", + "dflt": "", + "role": "style", + "valType": "enumerated", + "values": [ + "outside", + "inside", + "" + ] + }, + "ticksuffix": { + "description": "Sets a tick label suffix.", + "dflt": "", + "role": "style", + "valType": "string" + }, + "ticktext": { + "description": "Sets the text displayed at the ticks position via `tickvals`. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "ticktextsrc": { + "description": "Sets the source reference on plot.ly for ticktext .", + "role": "info", + "valType": "string" + }, + "tickvals": { + "description": "Sets the values at which ticks on this axis appear. Only has an effect if `tickmode` is set to *array*. Used with `ticktext`.", + "role": "data", + "valType": "data_array" + }, + "tickvalssrc": { + "description": "Sets the source reference on plot.ly for tickvals .", + "role": "info", + "valType": "string" + }, + "tickwidth": { + "description": "Sets the tick width (in px).", + "dflt": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "title": { + "description": "Sets the title of the color bar.", + "dflt": "Click to enter colorscale title", + "role": "info", + "valType": "string" + }, + "titlefont": { + "color": { + "role": "style", + "valType": "color" + }, + "description": "Sets this color bar's title font.", + "family": { + "description": "HTML font family - the typeface that will be applied by the web browser. The web browser will only be able to apply a font if it is available on the system which it operates. Provide multiple font families, separated by commas, to indicate the preference in which to apply fonts if they aren't available on the system. The plotly service (at https://plot.ly or on-premise) generates images on a server, where only a select number of fonts are installed and supported. These include *Arial*, *Balto*, *Courier New*, *Droid Sans*,, *Droid Serif*, *Droid Sans Mono*, *Gravitas One*, *Old Standard TT*, *Open Sans*, *Overpass*, *PT Sans Narrow*, *Raleway*, *Times New Roman*.", + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "role": "object", + "size": { + "min": 1, + "role": "style", + "valType": "number" + } + }, + "titleside": { + "description": "Determines the location of the colorbar title with respect to the color bar.", + "dflt": "top", + "role": "style", + "valType": "enumerated", + "values": [ + "right", + "top", + "bottom" + ] + }, + "x": { + "description": "Sets the x position of the color bar (in plot fraction).", + "dflt": 1.02, + "max": 3, + "min": -2, + "role": "style", + "valType": "number" + }, + "xanchor": { + "description": "Sets this color bar's horizontal position anchor. This anchor binds the `x` position to the *left*, *center* or *right* of the color bar.", + "dflt": "left", + "role": "style", + "valType": "enumerated", + "values": [ + "left", + "center", + "right" + ] + }, + "xpad": { + "description": "Sets the amount of padding (in px) along the x direction.", + "dflt": 10, + "min": 0, + "role": "style", + "valType": "number" + }, + "y": { + "description": "Sets the y position of the color bar (in plot fraction).", + "dflt": 0.5, + "max": 3, + "min": -2, + "role": "style", + "valType": "number" + }, + "yanchor": { + "description": "Sets this color bar's vertical position anchor This anchor binds the `y` position to the *top*, *middle* or *bottom* of the color bar.", + "dflt": "middle", + "role": "style", + "valType": "enumerated", + "values": [ + "top", + "middle", + "bottom" + ] + }, + "ypad": { + "description": "Sets the amount of padding (in px) along the y direction.", + "dflt": 10, + "min": 0, + "role": "style", + "valType": "number" + } + }, + "colorscale": { + "description": "Sets the colorscale and only has an effect if `marker.color` is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)', [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use `marker.cmin` and `marker.cmax`.", "role": "style", - "valType": "color" + "valType": "colorscale" }, "colorsrc": { "description": "Sets the source reference on plot.ly for color .", "role": "info", "valType": "string" }, - "description": "Sets the text font.", - "family": { - "arrayOk": true, - "noBlank": true, - "role": "style", - "strict": true, - "valType": "string" - }, - "familysrc": { - "description": "Sets the source reference on plot.ly for family .", - "role": "info", - "valType": "string" - }, - "role": "object", - "size": { - "arrayOk": true, - "min": 1, - "role": "style", - "valType": "number" - }, - "sizesrc": { - "description": "Sets the source reference on plot.ly for size .", - "role": "info", - "valType": "string" - } - }, - "textposition": { - "arrayOk": true, - "description": "Sets the positions of the `text` elements with respects to the (x,y) coordinates.", - "dflt": "middle center", - "role": "style", - "valType": "enumerated", - "values": [ - "top left", - "top center", - "top right", - "middle left", - "middle center", - "middle right", - "bottom left", - "bottom center", - "bottom right" - ] - }, - "textpositionsrc": { - "description": "Sets the source reference on plot.ly for textposition .", - "role": "info", - "valType": "string" - }, - "textsrc": { - "description": "Sets the source reference on plot.ly for text .", - "role": "info", - "valType": "string" - }, - "type": "scattergeo", - "uid": { - "dflt": "", - "role": "info", - "valType": "string" - }, - "visible": { - "description": "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).", - "dflt": true, - "role": "info", - "valType": "enumerated", - "values": [ - true, - false, - "legendonly" - ] - } - }, - "description": "The data visualized as scatter point or lines on a geographic map is provided either by longitude/latitude pairs in `lon` and `lat` respectively or by geographic location IDs or names in `locations`.", - "hrName": "scatter_geo" - }, - "scattergl": { - "attributes": { - "dx": { - "description": "Sets the x coordinate step. See `x0` for more info.", - "dflt": 1, - "role": "info", - "valType": "number" - }, - "dy": { - "description": "Sets the y coordinate step. See `y0` for more info.", - "dflt": 1, - "role": "info", - "valType": "number" - }, - "error_x": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", + "line": { + "autocolorscale": { + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", + "dflt": true, + "role": "style", + "valType": "boolean" + }, + "cauto": { + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", + "dflt": true, "role": "style", + "valType": "boolean" + }, + "cmax": { + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", + "dflt": null, + "role": "info", "valType": "number" - } - }, - "array": { - "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", - "role": "data", - "valType": "data_array" - }, - "arrayminus": { - "description": "Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data.", - "role": "data", - "valType": "data_array" - }, - "arrayminussrc": { - "description": "Sets the source reference on plot.ly for arrayminus .", - "role": "info", - "valType": "string" - }, - "arraysrc": { - "description": "Sets the source reference on plot.ly for array .", - "role": "info", - "valType": "string" + }, + "cmin": { + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", + "dflt": null, + "role": "info", + "valType": "number" + }, + "color": { + "arrayOk": true, + "description": "Sets the marker outline color. It accepts either a specific color or an array of values that are mapped to the colorscale relative to the max and min values of the array or relative to `cmin` and `cmax` if set.", + "role": "style", + "valType": "color" + }, + "colorscale": { + "description": "Sets the colorscale and only has an effect if `marker.line.color` is set to a numerical array. The colorscale must be an array containing arrays mapping a normalized value to an rgb, rgba, hex, hsl, hsv, or named color string. At minimum, a mapping for the lowest (0) and highest (1) values are required. For example, `[[0, 'rgb(0,0,255)', [1, 'rgb(255,0,0)']]`. To control the bounds of the colorscale in color space, use `marker.line.cmin` and `marker.line.cmax`.", + "role": "style", + "valType": "colorscale" + }, + "colorsrc": { + "description": "Sets the source reference on plot.ly for color .", + "role": "info", + "valType": "string" + }, + "reversescale": { + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Reverses the colorscale.", + "dflt": false, + "role": "style", + "valType": "boolean" + }, + "role": "object", + "width": { + "arrayOk": true, + "description": "Sets the width (in px) of the lines bounding the marker points.", + "min": 0, + "role": "style", + "valType": "number" + }, + "widthsrc": { + "description": "Sets the source reference on plot.ly for width .", + "role": "info", + "valType": "string" + } }, - "color": { - "description": "Sets the stoke color of the error bars.", + "opacity": { + "arrayOk": true, + "description": "Sets the marker opacity.", + "max": 1, + "min": 0, "role": "style", - "valType": "color" + "valType": "number" }, - "copy_ystyle": { - "role": "style", - "valType": "boolean" + "opacitysrc": { + "description": "Sets the source reference on plot.ly for opacity .", + "role": "info", + "valType": "string" }, - "copy_zstyle": { + "reversescale": { + "description": "Has an effect only if `marker.color` is set to a numerical array. Reverses the colorscale.", + "dflt": false, "role": "style", "valType": "boolean" }, "role": "object", - "symmetric": { - "description": "Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars.", + "showscale": { + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", + "dflt": false, "role": "info", "valType": "boolean" }, - "thickness": { - "description": "Sets the thickness (in px) of the error bars.", - "dflt": 2, + "size": { + "arrayOk": true, + "description": "Sets the marker size (in px).", + "dflt": 6, "min": 0, "role": "style", "valType": "number" }, - "traceref": { - "dflt": 0, - "min": 0, - "role": "info", - "valType": "integer" - }, - "tracerefminus": { + "sizemin": { + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", "dflt": 0, "min": 0, - "role": "info", - "valType": "integer" + "role": "style", + "valType": "number" }, - "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the sqaure of the underlying data. If *array*, the bar lengths are set with data set `array`.", + "sizemode": { + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", + "dflt": "diameter", "role": "info", "valType": "enumerated", "values": [ - "percent", - "constant", - "sqrt", - "data" + "diameter", + "area" ] }, - "value": { - "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars.", - "dflt": 10, - "min": 0, - "role": "info", - "valType": "number" - }, - "valueminus": { - "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars", - "dflt": 10, - "min": 0, - "role": "info", - "valType": "number" - }, - "visible": { - "description": "Determines whether or not this set of error bars is visible.", - "role": "info", - "valType": "boolean" - }, - "width": { - "description": "Sets the width (in px) of the cross-bar at both ends of the error bars.", - "min": 0, + "sizeref": { + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", + "dflt": 1, "role": "style", "valType": "number" - } - }, - "error_y": { - "_deprecated": { - "opacity": { - "description": "Obsolete. Use the alpha channel in error bar `color` to set the opacity.", - "role": "style", - "valType": "number" - } - }, - "array": { - "description": "Sets the data corresponding the length of each error bar. Values are plotted relative to the underlying data.", - "role": "data", - "valType": "data_array" - }, - "arrayminus": { - "description": "Sets the data corresponding the length of each error bar in the bottom (left) direction for vertical (horizontal) bars Values are plotted relative to the underlying data.", - "role": "data", - "valType": "data_array" - }, - "arrayminussrc": { - "description": "Sets the source reference on plot.ly for arrayminus .", - "role": "info", - "valType": "string" }, - "arraysrc": { - "description": "Sets the source reference on plot.ly for array .", + "sizesrc": { + "description": "Sets the source reference on plot.ly for size .", "role": "info", "valType": "string" }, - "color": { - "description": "Sets the stoke color of the error bars.", - "role": "style", - "valType": "color" - }, - "copy_ystyle": { - "role": "style", - "valType": "boolean" - }, - "copy_zstyle": { - "role": "style", - "valType": "boolean" - }, - "role": "object", - "symmetric": { - "description": "Determines whether or not the error bars have the same length in both direction (top/bottom for vertical bars, left/right for horizontal bars.", - "role": "info", - "valType": "boolean" - }, - "thickness": { - "description": "Sets the thickness (in px) of the error bars.", - "dflt": 2, - "min": 0, + "symbol": { + "arrayOk": true, + "description": "Sets the marker symbol type.", + "dflt": "circle", "role": "style", - "valType": "number" - }, - "traceref": { - "dflt": 0, - "min": 0, - "role": "info", - "valType": "integer" - }, - "tracerefminus": { - "dflt": 0, - "min": 0, - "role": "info", - "valType": "integer" - }, - "type": { - "description": "Determines the rule used to generate the error bars. If *constant`, the bar lengths are of a constant value. Set this constant in `value`. If *percent*, the bar lengths correspond to a percentage of underlying data. Set this percentage in `value`. If *sqrt*, the bar lengths correspond to the sqaure of the underlying data. If *array*, the bar lengths are set with data set `array`.", - "role": "info", "valType": "enumerated", "values": [ - "percent", - "constant", - "sqrt", - "data" + "circle", + "circle-open", + "square", + "square-open", + "diamond", + "diamond-open", + "cross", + "x" ] }, - "value": { - "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars.", - "dflt": 10, - "min": 0, + "symbolsrc": { + "description": "Sets the source reference on plot.ly for symbol .", "role": "info", - "valType": "number" - }, - "valueminus": { - "description": "Sets the value of either the percentage (if `type` is set to *percent*) or the constant (if `type` is set to *constant*) corresponding to the lengths of the error bars in the bottom (left) direction for vertical (horizontal) bars", - "dflt": 10, + "valType": "string" + } + }, + "mode": { + "description": "Determines the drawing mode for this scatter trace.", + "extras": [ + "none" + ], + "flags": [ + "lines", + "markers" + ], + "role": "info", + "valType": "flaglist" + }, + "name": { + "description": "Sets the trace name. The trace name appear as the legend item and on hover.", + "role": "info", + "valType": "string" + }, + "opacity": { + "description": "Sets the opacity of the trace.", + "dflt": 1, + "max": 1, + "min": 0, + "role": "style", + "valType": "number" + }, + "showlegend": { + "description": "Determines whether or not an item corresponding to this trace is shown in the legend.", + "dflt": true, + "role": "info", + "valType": "boolean" + }, + "stream": { + "maxpoints": { + "description": "Sets the maximum number of points to keep on the plots from an incoming stream. If `maxpoints` is set to *50*, only the newest 50 points will be displayed on the plot.", "min": 0, "role": "info", "valType": "number" }, - "visible": { - "description": "Determines whether or not this set of error bars is visible.", + "role": "object", + "token": { + "description": "The stream id number links a data trace on a plot with a stream. See https://plot.ly/settings for more details.", + "noBlank": true, "role": "info", - "valType": "boolean" - }, - "width": { - "description": "Sets the width (in px) of the cross-bar at both ends of the error bars.", - "min": 0, - "role": "style", - "valType": "number" + "strict": true, + "valType": "string" } }, + "text": { + "arrayOk": true, + "description": "Sets text elements associated with each (x,y) pair to appear on hover. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates.", + "dflt": "", + "role": "info", + "valType": "string" + }, + "textsrc": { + "description": "Sets the source reference on plot.ly for text .", + "role": "info", + "valType": "string" + }, + "type": "scattergl", + "uid": { + "dflt": "", + "role": "info", + "valType": "string" + }, + "visible": { + "description": "Determines whether or not this trace is visible. If *legendonly*, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).", + "dflt": true, + "role": "info", + "valType": "enumerated", + "values": [ + true, + false, + "legendonly" + ] + }, + "x": { + "description": "Sets the x coordinates.", + "role": "data", + "valType": "data_array" + }, + "x0": { + "description": "Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting coordinate and `dx` the step.", + "dflt": 0, + "role": "info", + "valType": "any" + }, + "xaxis": { + "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", + "dflt": "x", + "role": "info", + "valType": "subplotid" + }, + "xsrc": { + "description": "Sets the source reference on plot.ly for x .", + "role": "info", + "valType": "string" + }, + "y": { + "description": "Sets the y coordinates.", + "role": "data", + "valType": "data_array" + }, + "y0": { + "description": "Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting coordinate and `dy` the step.", + "dflt": 0, + "role": "info", + "valType": "any" + }, + "yaxis": { + "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", + "dflt": "y", + "role": "info", + "valType": "subplotid" + }, + "ysrc": { + "description": "Sets the source reference on plot.ly for y .", + "role": "info", + "valType": "string" + } + }, + "description": "The data visualized as scatter point or lines is set in `x` and `y` using the WebGl plotting engine. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to a numerical arrays." + }, + "scatterternary": { + "attributes": { + "a": { + "description": "Sets the quantity of component `a` in each data point. If `a`, `b`, and `c` are all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to match `ternary.sum`.", + "role": "data", + "valType": "data_array" + }, + "asrc": { + "description": "Sets the source reference on plot.ly for a .", + "role": "info", + "valType": "string" + }, + "b": { + "description": "Sets the quantity of component `a` in each data point. If `a`, `b`, and `c` are all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to match `ternary.sum`.", + "role": "data", + "valType": "data_array" + }, + "bsrc": { + "description": "Sets the source reference on plot.ly for b .", + "role": "info", + "valType": "string" + }, + "c": { + "description": "Sets the quantity of component `a` in each data point. If `a`, `b`, and `c` are all provided, they need not be normalized, only the relative values matter. If only two arrays are provided they must be normalized to match `ternary.sum`.", + "role": "data", + "valType": "data_array" + }, + "connectgaps": { + "description": "Determines whether or not gaps (i.e. {nan} or missing values) in the provided data arrays are connected.", + "dflt": false, + "role": "info", + "valType": "boolean" + }, + "csrc": { + "description": "Sets the source reference on plot.ly for c .", + "role": "info", + "valType": "string" + }, "fill": { - "description": "Sets the area to fill with a solid color. Use with `fillcolor`.", + "description": "Sets the area to fill with a solid color. Use with `fillcolor` if not *none*. scatterternary has a subset of the options available to scatter. *toself* connects the endpoints of the trace (or each segment of the trace if it has gaps) into a closed shape. *tonext* fills the space between two traces if one completely encloses the other (eg consecutive contour lines), and behaves like *toself* if there is no trace before it. *tonext* should not be used if one trace does not enclose the other.", "dflt": "none", "role": "style", "valType": "enumerated", "values": [ "none", - "tozeroy", - "tozerox" + "toself", + "tonext" ] }, "fillcolor": { - "description": "Sets the fill color.", + "description": "Sets the fill color. Defaults to a half-transparent variant of the line color, marker color, or marker line color, whichever is available.", "role": "style", "valType": "color" }, @@ -14377,9 +16152,9 @@ "none" ], "flags": [ - "x", - "y", - "z", + "a", + "b", + "c", "text", "name" ], @@ -14399,10 +16174,10 @@ "valType": "color" }, "dash": { - "description": "Sets the style of the lines.", + "description": "Sets the style of the lines. Set to a dash string type or a dash length in px.", "dflt": "solid", "role": "style", - "valType": "enumerated", + "valType": "string", "values": [ "solid", "dot", @@ -14413,6 +16188,24 @@ ] }, "role": "object", + "shape": { + "description": "Determines the line shape. With *spline* the lines are drawn using spline interpolation. The other available values correspond to step-wise line shapes.", + "dflt": "linear", + "role": "style", + "valType": "enumerated", + "values": [ + "linear", + "spline" + ] + }, + "smoothing": { + "description": "Has an effect only if `shape` is set to *spline* Sets the amount of smoothing. *0* corresponds to no smoothing (equivalent to a *linear* shape).", + "dflt": 1, + "max": 1.3, + "min": 0, + "role": "style", + "valType": "number" + }, "width": { "description": "Sets the line width (in px).", "dflt": 2, @@ -14423,25 +16216,25 @@ }, "marker": { "autocolorscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not the colorscale is picked using values inside `marker.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines the whether or not the color domain is computed automatically.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.color` array index, and if set, `marker.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -14802,25 +16595,25 @@ }, "line": { "autocolorscale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines whether or not the colorscale is picked using the sign of values inside `marker.line.color`.", "dflt": true, "role": "style", "valType": "boolean" }, "cauto": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Determines the whether or not the color domain is computed with respect to the input data.", "dflt": true, "role": "style", "valType": "boolean" }, "cmax": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the upper bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmin` must be set as well.", "dflt": null, "role": "info", "valType": "number" }, "cmin": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Sets the lower bound of the color domain. Value should be associated to the `marker.line.color` array index, and if set, `marker.line.cmax` must be set as well.", "dflt": null, "role": "info", "valType": "number" @@ -14842,7 +16635,7 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.line.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.line.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" @@ -14861,6 +16654,13 @@ "valType": "string" } }, + "maxdisplayed": { + "description": "Sets a maximum number of points to be drawn on the graph. *0* corresponds to no limit.", + "dflt": 0, + "min": 0, + "role": "style", + "valType": "number" + }, "opacity": { "arrayOk": true, "description": "Sets the marker opacity.", @@ -14875,14 +16675,14 @@ "valType": "string" }, "reversescale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Reverses the colorscale.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Reverses the colorscale.", "dflt": false, "role": "style", "valType": "boolean" }, "role": "object", "showscale": { - "description": "Has only an effect if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", + "description": "Has an effect only if `marker.color` is set to a numerical array. Determines whether or not a colorbar is displayed.", "dflt": false, "role": "info", "valType": "boolean" @@ -14896,14 +16696,14 @@ "valType": "number" }, "sizemin": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the minimum size (in px) of the rendered marker points.", "dflt": 0, "min": 0, "role": "style", "valType": "number" }, "sizemode": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the rule for which the data in `size` is converted to pixels.", "dflt": "diameter", "role": "info", "valType": "enumerated", @@ -14913,7 +16713,7 @@ ] }, "sizeref": { - "description": "Has only an effect if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", + "description": "Has an effect only if `marker.size` is set to a numerical array. Sets the scale factor used to determine the rendered size of marker points. Use with `sizemin` and `sizemode`.", "dflt": 1, "role": "style", "valType": "number" @@ -14925,19 +16725,295 @@ }, "symbol": { "arrayOk": true, - "description": "Sets the marker symbol type.", + "description": "Sets the marker symbol type. Adding 100 is equivalent to appending *-open* to a symbol name. Adding 200 is equivalent to appending *-dot* to a symbol name. Adding 300 is equivalent to appending *-open-dot* or *dot-open* to a symbol name.", "dflt": "circle", "role": "style", "valType": "enumerated", "values": [ + 0, "circle", + 100, "circle-open", + 200, + "circle-dot", + 300, + "circle-open-dot", + 1, "square", + 101, "square-open", + 201, + "square-dot", + 301, + "square-open-dot", + 2, "diamond", + 102, "diamond-open", + 202, + "diamond-dot", + 302, + "diamond-open-dot", + 3, "cross", - "x" + 103, + "cross-open", + 203, + "cross-dot", + 303, + "cross-open-dot", + 4, + "x", + 104, + "x-open", + 204, + "x-dot", + 304, + "x-open-dot", + 5, + "triangle-up", + 105, + "triangle-up-open", + 205, + "triangle-up-dot", + 305, + "triangle-up-open-dot", + 6, + "triangle-down", + 106, + "triangle-down-open", + 206, + "triangle-down-dot", + 306, + "triangle-down-open-dot", + 7, + "triangle-left", + 107, + "triangle-left-open", + 207, + "triangle-left-dot", + 307, + "triangle-left-open-dot", + 8, + "triangle-right", + 108, + "triangle-right-open", + 208, + "triangle-right-dot", + 308, + "triangle-right-open-dot", + 9, + "triangle-ne", + 109, + "triangle-ne-open", + 209, + "triangle-ne-dot", + 309, + "triangle-ne-open-dot", + 10, + "triangle-se", + 110, + "triangle-se-open", + 210, + "triangle-se-dot", + 310, + "triangle-se-open-dot", + 11, + "triangle-sw", + 111, + "triangle-sw-open", + 211, + "triangle-sw-dot", + 311, + "triangle-sw-open-dot", + 12, + "triangle-nw", + 112, + "triangle-nw-open", + 212, + "triangle-nw-dot", + 312, + "triangle-nw-open-dot", + 13, + "pentagon", + 113, + "pentagon-open", + 213, + "pentagon-dot", + 313, + "pentagon-open-dot", + 14, + "hexagon", + 114, + "hexagon-open", + 214, + "hexagon-dot", + 314, + "hexagon-open-dot", + 15, + "hexagon2", + 115, + "hexagon2-open", + 215, + "hexagon2-dot", + 315, + "hexagon2-open-dot", + 16, + "octagon", + 116, + "octagon-open", + 216, + "octagon-dot", + 316, + "octagon-open-dot", + 17, + "star", + 117, + "star-open", + 217, + "star-dot", + 317, + "star-open-dot", + 18, + "hexagram", + 118, + "hexagram-open", + 218, + "hexagram-dot", + 318, + "hexagram-open-dot", + 19, + "star-triangle-up", + 119, + "star-triangle-up-open", + 219, + "star-triangle-up-dot", + 319, + "star-triangle-up-open-dot", + 20, + "star-triangle-down", + 120, + "star-triangle-down-open", + 220, + "star-triangle-down-dot", + 320, + "star-triangle-down-open-dot", + 21, + "star-square", + 121, + "star-square-open", + 221, + "star-square-dot", + 321, + "star-square-open-dot", + 22, + "star-diamond", + 122, + "star-diamond-open", + 222, + "star-diamond-dot", + 322, + "star-diamond-open-dot", + 23, + "diamond-tall", + 123, + "diamond-tall-open", + 223, + "diamond-tall-dot", + 323, + "diamond-tall-open-dot", + 24, + "diamond-wide", + 124, + "diamond-wide-open", + 224, + "diamond-wide-dot", + 324, + "diamond-wide-open-dot", + 25, + "hourglass", + 125, + "hourglass-open", + 26, + "bowtie", + 126, + "bowtie-open", + 27, + "circle-cross", + 127, + "circle-cross-open", + 28, + "circle-x", + 128, + "circle-x-open", + 29, + "square-cross", + 129, + "square-cross-open", + 30, + "square-x", + 130, + "square-x-open", + 31, + "diamond-cross", + 131, + "diamond-cross-open", + 32, + "diamond-x", + 132, + "diamond-x-open", + 33, + "cross-thin", + 133, + "cross-thin-open", + 34, + "x-thin", + 134, + "x-thin-open", + 35, + "asterisk", + 135, + "asterisk-open", + 36, + "hash", + 136, + "hash-open", + 236, + "hash-dot", + 336, + "hash-open-dot", + 37, + "y-up", + 137, + "y-up-open", + 38, + "y-down", + 138, + "y-down-open", + 39, + "y-left", + 139, + "y-left-open", + 40, + "y-right", + 140, + "y-right-open", + 41, + "line-ew", + 141, + "line-ew-open", + 42, + "line-ns", + 142, + "line-ns-open", + 43, + "line-ne", + 143, + "line-ne-open", + 44, + "line-nw", + 144, + "line-nw-open" ] }, "symbolsrc": { @@ -14947,13 +17023,15 @@ } }, "mode": { - "description": "Determines the drawing mode for this scatter trace.", + "description": "Determines the drawing mode for this scatter trace. If the provided `mode` includes *text* then the `text` elements appear at the coordinates. Otherwise, the `text` elements appear on hover. If there are less than 20 points, then the default is *lines+markers*. Otherwise, *lines*.", + "dflt": "markers", "extras": [ "none" ], "flags": [ "lines", - "markers" + "markers", + "text" ], "role": "info", "valType": "flaglist" @@ -14993,19 +17071,92 @@ "valType": "string" } }, + "subplot": { + "description": "Sets a reference between this trace's data coordinates and a ternary subplot. If *ternary* (the default value), the data refer to `layout.ternary`. If *ternary2*, the data refer to `layout.ternary2`, and so on.", + "dflt": "ternary", + "role": "info", + "valType": "subplotid" + }, + "sum": { + "description": "The number each triplet should sum to, if only two of `a`, `b`, and `c` are provided. This overrides `ternary.sum` to normalize this specific trace, but does not affect the values displayed on the axes. 0 (or missing) means to use ternary.sum", + "dflt": 0, + "min": 0, + "role": "info", + "valType": "number" + }, "text": { "arrayOk": true, - "description": "Sets text elements associated with each (x,y) pair to appear on hover. If a single string, the same string appears over all the data points. If an array of string, the items are mapped in order to the this trace's (x,y) coordinates.", + "description": "Sets text elements associated with each (a,b,c) point. If a single string, the same string appears over all the data points. If an array of strings, the items are mapped in order to the the data points in (a,b,c).", "dflt": "", "role": "info", "valType": "string" }, + "textfont": { + "color": { + "arrayOk": true, + "role": "style", + "valType": "color" + }, + "colorsrc": { + "description": "Sets the source reference on plot.ly for color .", + "role": "info", + "valType": "string" + }, + "description": "Sets the text font.", + "family": { + "arrayOk": true, + "noBlank": true, + "role": "style", + "strict": true, + "valType": "string" + }, + "familysrc": { + "description": "Sets the source reference on plot.ly for family .", + "role": "info", + "valType": "string" + }, + "role": "object", + "size": { + "arrayOk": true, + "min": 1, + "role": "style", + "valType": "number" + }, + "sizesrc": { + "description": "Sets the source reference on plot.ly for size .", + "role": "info", + "valType": "string" + } + }, + "textposition": { + "arrayOk": true, + "description": "Sets the positions of the `text` elements with respects to the (x,y) coordinates.", + "dflt": "middle center", + "role": "style", + "valType": "enumerated", + "values": [ + "top left", + "top center", + "top right", + "middle left", + "middle center", + "middle right", + "bottom left", + "bottom center", + "bottom right" + ] + }, + "textpositionsrc": { + "description": "Sets the source reference on plot.ly for textposition .", + "role": "info", + "valType": "string" + }, "textsrc": { "description": "Sets the source reference on plot.ly for text .", "role": "info", "valType": "string" }, - "type": "scattergl", + "type": "scatterternary", "uid": { "dflt": "", "role": "info", @@ -15021,53 +17172,10 @@ false, "legendonly" ] - }, - "x": { - "description": "Sets the x coordinates.", - "role": "data", - "valType": "data_array" - }, - "x0": { - "description": "Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting coordinate and `dx` the step.", - "dflt": 0, - "role": "info", - "valType": "any" - }, - "xaxis": { - "description": "Sets a reference between this trace's x coordinates and a 2D cartesian x axis. If *x* (the default value), the x coordinates refer to `layout.xaxis`. If *x2*, the x coordinates refer to `layout.xaxis2`, and so on.", - "dflt": "x", - "role": "info", - "valType": "axisid" - }, - "xsrc": { - "description": "Sets the source reference on plot.ly for x .", - "role": "info", - "valType": "string" - }, - "y": { - "description": "Sets the y coordinates.", - "role": "data", - "valType": "data_array" - }, - "y0": { - "description": "Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting coordinate and `dy` the step.", - "dflt": 0, - "role": "info", - "valType": "any" - }, - "yaxis": { - "description": "Sets a reference between this trace's y coordinates and a 2D cartesian y axis. If *y* (the default value), the y coordinates refer to `layout.yaxis`. If *y2*, the y coordinates refer to `layout.xaxis2`, and so on.", - "dflt": "y", - "role": "info", - "valType": "axisid" - }, - "ysrc": { - "description": "Sets the source reference on plot.ly for y .", - "role": "info", - "valType": "string" } }, - "description": "The data visualized as scatter point or lines is set in `x` and `y` using the WebGl plotting engine. Bubble charts are achieved by setting `marker.size` and/or `marker.color` to a numerical arrays." + "description": "Provides similar functionality to the *scatter* type but on a ternary phase diagram. The data is provided by at least two arrays out of `a`, `b`, `c` triplets.", + "hrName": "scatter_ternary" }, "surface": { "attributes": { @@ -15462,21 +17570,25 @@ "role": "object", "x": { "color": { - "dflt": "#000", + "description": "Sets the color of the contour lines.", + "dflt": "#444", "role": "style", "valType": "color" }, "highlight": { - "dflt": false, + "description": "Determines whether or not contour lines about the x dimension are highlighted on hover.", + "dflt": true, "role": "info", "valType": "boolean" }, - "highlightColor": { - "dflt": "#000", + "highlightcolor": { + "description": "Sets the color of the highlighted contour lines.", + "dflt": "#444", "role": "style", "valType": "color" }, - "highlightWidth": { + "highlightwidth": { + "description": "Sets the width of the highlighted contour lines.", "dflt": 2, "max": 16, "min": 1, @@ -15486,19 +17598,19 @@ "project": { "role": "object", "x": { - "description": "Sets whether or not the dynamic contours are projected along the x axis.", + "description": "Determines whether or not these contour lines are projected on the x axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" }, "y": { - "description": "Sets whether or not the dynamic contours are projected along the y axis.", + "description": "Determines whether or not these contour lines are projected on the y axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" }, "z": { - "description": "Sets whether or not the dynamic contours are projected along the z axis.", + "description": "Determines whether or not these contour lines are projected on the z axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" @@ -15506,17 +17618,19 @@ }, "role": "object", "show": { - "description": "Sets whether or not dynamic contours are shown along the x axis", + "description": "Determines whether or not contour lines about the x dimension are drawn.", "dflt": false, "role": "info", "valType": "boolean" }, "usecolormap": { + "description": "An alternate to *color*. Determines whether or not the contour lines are colored using the trace *colorscale*.", "dflt": false, "role": "info", "valType": "boolean" }, "width": { + "description": "Sets the width of the contour lines.", "dflt": 2, "max": 16, "min": 1, @@ -15526,21 +17640,25 @@ }, "y": { "color": { - "dflt": "#000", + "description": "Sets the color of the contour lines.", + "dflt": "#444", "role": "style", "valType": "color" }, "highlight": { - "dflt": false, + "description": "Determines whether or not contour lines about the y dimension are highlighted on hover.", + "dflt": true, "role": "info", "valType": "boolean" }, - "highlightColor": { - "dflt": "#000", + "highlightcolor": { + "description": "Sets the color of the highlighted contour lines.", + "dflt": "#444", "role": "style", "valType": "color" }, - "highlightWidth": { + "highlightwidth": { + "description": "Sets the width of the highlighted contour lines.", "dflt": 2, "max": 16, "min": 1, @@ -15550,19 +17668,19 @@ "project": { "role": "object", "x": { - "description": "Sets whether or not the dynamic contours are projected along the x axis.", + "description": "Determines whether or not these contour lines are projected on the x axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" }, "y": { - "description": "Sets whether or not the dynamic contours are projected along the y axis.", + "description": "Determines whether or not these contour lines are projected on the y axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" }, "z": { - "description": "Sets whether or not the dynamic contours are projected along the z axis.", + "description": "Determines whether or not these contour lines are projected on the z axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" @@ -15570,17 +17688,19 @@ }, "role": "object", "show": { - "description": "Sets whether or not dynamic contours are shown along the y axis", + "description": "Determines whether or not contour lines about the y dimension are drawn.", "dflt": false, "role": "info", "valType": "boolean" }, "usecolormap": { + "description": "An alternate to *color*. Determines whether or not the contour lines are colored using the trace *colorscale*.", "dflt": false, "role": "info", "valType": "boolean" }, "width": { + "description": "Sets the width of the contour lines.", "dflt": 2, "max": 16, "min": 1, @@ -15590,21 +17710,25 @@ }, "z": { "color": { - "dflt": "#000", + "description": "Sets the color of the contour lines.", + "dflt": "#444", "role": "style", "valType": "color" }, "highlight": { - "dflt": false, + "description": "Determines whether or not contour lines about the z dimension are highlighted on hover.", + "dflt": true, "role": "info", "valType": "boolean" }, - "highlightColor": { - "dflt": "#000", + "highlightcolor": { + "description": "Sets the color of the highlighted contour lines.", + "dflt": "#444", "role": "style", "valType": "color" }, - "highlightWidth": { + "highlightwidth": { + "description": "Sets the width of the highlighted contour lines.", "dflt": 2, "max": 16, "min": 1, @@ -15614,19 +17738,19 @@ "project": { "role": "object", "x": { - "description": "Sets whether or not the dynamic contours are projected along the x axis.", + "description": "Determines whether or not these contour lines are projected on the x axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" }, "y": { - "description": "Sets whether or not the dynamic contours are projected along the y axis.", + "description": "Determines whether or not these contour lines are projected on the y axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" }, "z": { - "description": "Sets whether or not the dynamic contours are projected along the z axis.", + "description": "Determines whether or not these contour lines are projected on the z axis walls. If `highlight` is set to *true* (the default), the projected lines are shown on hover. If `show` is set to *true*, the projected lines are shown in permanence.", "dflt": false, "role": "info", "valType": "boolean" @@ -15634,17 +17758,19 @@ }, "role": "object", "show": { - "description": "Sets whether or not dynamic contours are shown along the z axis", + "description": "Determines whether or not contour lines about the z dimension are drawn.", "dflt": false, "role": "info", "valType": "boolean" }, "usecolormap": { + "description": "An alternate to *color*. Determines whether or not the contour lines are colored using the trace *colorscale*.", "dflt": false, "role": "info", "valType": "boolean" }, "width": { + "description": "Sets the width of the contour lines.", "dflt": 2, "max": 16, "min": 1, @@ -15654,6 +17780,7 @@ } }, "hidesurface": { + "description": "Determines whether or not a surface is drawn. For example, set `hidesurface` to *false* `contours.x.show` to *true* and `contours.y.show` to *true* to draw a wire frame plot.", "dflt": false, "role": "info", "valType": "boolean" @@ -15725,6 +17852,7 @@ "valType": "string" }, "opacity": { + "description": "Sets the opacity of the surface.", "dflt": 1, "max": 1, "min": 0, @@ -15741,7 +17869,7 @@ "description": "Sets a reference between this trace's 3D coordinate system and a 3D scene. If *scene* (the default value), the (x,y,z) coordinates refer to `layout.scene`. If *scene2*, the (x,y,z) coordinates refer to `layout.scene2`, and so on.", "dflt": "scene", "role": "info", - "valType": "sceneid" + "valType": "subplotid" }, "showlegend": { "description": "Determines whether or not an item corresponding to this trace is shown in the legend.", From 6756fc374c5c416c827b103b3d45861e568ffad1 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Thu, 5 May 2016 17:58:24 -0400 Subject: [PATCH 04/26] Replaced reduce() method because of Python 3.3 Incompatibility --- plotly/tools.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index 2feaf7bd360..a3a6a56014c 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1582,8 +1582,18 @@ def _trisurf(x, y, z, simplices, colormap=None, # None separates data corresponding to two consecutive triangles lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - Xe, Ye, Ze = ([reduce(lambda x, y: x+y, lists_coord[k]) - for k in range(3)]) + + Xe = lists_coord[0][0] + lists_coord[0][1] + for index in range(2, len(lists_coord[0])): + Xe = Xe + lists_coord[0][index] + + Ye = lists_coord[1][0] + lists_coord[1][1] + for index in range(2, len(lists_coord[1])): + Ye = Ye + lists_coord[1][index] + + Ze = lists_coord[2][0] + lists_coord[2][1] + for index in range(2, len(lists_coord[2])): + Ze = Ze + lists_coord[2][index] # define the lines to be plotted lines = graph_objs.Scatter3d( From a47b88d3d0cbf54c36592af742691c0d741665c1 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 10:16:53 -0400 Subject: [PATCH 05/26] Rewrote reduce() line more explicitly and clearly for compatibility with Python 2, 3.3 and 3.4 --- plotly/tools.py | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index a3a6a56014c..b02c3e8d2cc 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1583,17 +1583,20 @@ def _trisurf(x, y, z, simplices, colormap=None, lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - Xe = lists_coord[0][0] + lists_coord[0][1] - for index in range(2, len(lists_coord[0])): - Xe = Xe + lists_coord[0][index] - - Ye = lists_coord[1][0] + lists_coord[1][1] - for index in range(2, len(lists_coord[1])): - Ye = Ye + lists_coord[1][index] - - Ze = lists_coord[2][0] + lists_coord[2][1] - for index in range(2, len(lists_coord[2])): - Ze = Ze + lists_coord[2][index] + Xe = [] + for array in lists_coord[0]: + for item in array: + Xe.append(item) + + Ye = [] + for array in lists_coord[1]: + for item in array: + Ye.append(item) + + Ze = [] + for array in lists_coord[2]: + for item in array: + Ze.append(item) # define the lines to be plotted lines = graph_objs.Scatter3d( From 5226650f409d9ec656edf3da502c2bc045865833 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 10:51:04 -0400 Subject: [PATCH 06/26] Try again --- plotly/tools.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index b02c3e8d2cc..73db73318f9 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1549,7 +1549,7 @@ def _tri_indices(simplices): @staticmethod def _trisurf(x, y, z, simplices, colormap=None, - plot_edges=None): + plot_edges=None, Xe=None, Ye=None, Ze=None): """ Refer to FigureFactory.create_trisurf() for docstring """ @@ -1582,18 +1582,20 @@ def _trisurf(x, y, z, simplices, colormap=None, # None separates data corresponding to two consecutive triangles lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - - Xe = [] + if Xe is None: + Xe = [] for array in lists_coord[0]: for item in array: Xe.append(item) - Ye = [] + if Ye is None: + Ye = [] for array in lists_coord[1]: for item in array: Ye.append(item) - Ze = [] + if Ze is None: + Ze = [] for array in lists_coord[2]: for item in array: Ze.append(item) From bc42794cb6bf41fe67598ef6870db85e35c39311 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 11:05:11 -0400 Subject: [PATCH 07/26] from functools import reduce --- plotly/tools.py | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index 73db73318f9..5a695359178 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -14,6 +14,7 @@ import six import math +from functools import reduce from plotly import utils from plotly import exceptions @@ -1582,23 +1583,26 @@ def _trisurf(x, y, z, simplices, colormap=None, # None separates data corresponding to two consecutive triangles lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - if Xe is None: - Xe = [] - for array in lists_coord[0]: - for item in array: - Xe.append(item) - - if Ye is None: - Ye = [] - for array in lists_coord[1]: - for item in array: - Ye.append(item) - - if Ze is None: - Ze = [] - for array in lists_coord[2]: - for item in array: - Ze.append(item) + #if Xe is None: + # Xe = [] + #for array in lists_coord[0]: + # for item in array: + # Xe.append(item) + + #if Ye is None: + # Ye = [] + #for array in lists_coord[1]: + # for item in array: + # Ye.append(item) + + #if Ze is None: + # Ze = [] + #for array in lists_coord[2]: + # for item in array: + # Ze.append(item) + + Xe, Ye, Ze = ([reduce(lambda x, y: x+y, + lists_coord[k]) for k in range(3)]) # define the lines to be plotted lines = graph_objs.Scatter3d( From 1fe18c2fb6d0f99e853f4f275e7f1f38429c086d Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 11:28:27 -0400 Subject: [PATCH 08/26] go back to reduce() --- plotly/tools.py | 1 - 1 file changed, 1 deletion(-) diff --git a/plotly/tools.py b/plotly/tools.py index 5a695359178..ef6aae0cbeb 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -14,7 +14,6 @@ import six import math -from functools import reduce from plotly import utils from plotly import exceptions From 781d0c8be2287aa87900f2974a1f45c37f59aa4b Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 11:35:13 -0400 Subject: [PATCH 09/26] Updated default_json --- plotly/graph_reference/default-schema.json | 2 +- plotly/tools.py | 40 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/plotly/graph_reference/default-schema.json b/plotly/graph_reference/default-schema.json index 4972b981cb2..b3a0640193b 100644 --- a/plotly/graph_reference/default-schema.json +++ b/plotly/graph_reference/default-schema.json @@ -2563,7 +2563,7 @@ "valType": "any" }, "xref": { - "description": "Sets the shape's x coordinate axis. If set to an x axis id (e.g. *x* or *x2*), the `x` position refers to an x coordinate If set to *paper*, the `x` position refers to the distance from the left side of the plotting area in normalized coordinates where *0* (*1*) corresponds to the left (right) side.", + "description": "Sets the shape's x coordinate axis. If set to an x axis id (e.g. *x* or *x2*), the `x` position refers to an x coordinate If set to *paper*, the `x` position refers to the distance from the left side of the plotting area in normalized coordinates where *0* (*1*) corresponds to the left (right) side. If the axis `type` is *log*, then you must take the log of your desired range. If the axis `type` is *date*, then you must convert the date to unix time in milliseconds.", "role": "info", "valType": "enumerated", "values": [ diff --git a/plotly/tools.py b/plotly/tools.py index ef6aae0cbeb..f09e056181c 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1582,26 +1582,26 @@ def _trisurf(x, y, z, simplices, colormap=None, # None separates data corresponding to two consecutive triangles lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - #if Xe is None: - # Xe = [] - #for array in lists_coord[0]: - # for item in array: - # Xe.append(item) - - #if Ye is None: - # Ye = [] - #for array in lists_coord[1]: - # for item in array: - # Ye.append(item) - - #if Ze is None: - # Ze = [] - #for array in lists_coord[2]: - # for item in array: - # Ze.append(item) - - Xe, Ye, Ze = ([reduce(lambda x, y: x+y, - lists_coord[k]) for k in range(3)]) + if Xe is None: + Xe = [] + for array in lists_coord[0]: + for item in array: + Xe.append(item) + + if Ye is None: + Ye = [] + for array in lists_coord[1]: + for item in array: + Ye.append(item) + + if Ze is None: + Ze = [] + for array in lists_coord[2]: + for item in array: + Ze.append(item) + + #Xe, Ye, Ze = ([reduce(lambda x, y: x+y, + # lists_coord[k]) for k in range(3)]) # define the lines to be plotted lines = graph_objs.Scatter3d( From 463fd3e2be4ae32a457dbb0be503c31ee056a2d1 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 12:02:45 -0400 Subject: [PATCH 10/26] only check layout --- plotly/tests/test_optional/test_figure_factory.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index b167aca2164..e02bea2ac8c 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -828,11 +828,11 @@ def test_trisurf_all_args(self): 'title': 'Fun', 'width': 500}} - self.assert_dict_equal(test_trisurf_plot['data'][0], - exp_trisurf_plot['data'][0]) + #self.assert_dict_equal(test_trisurf_plot['data'][0], + # exp_trisurf_plot['data'][0]) - self.assert_dict_equal(test_trisurf_plot['data'][1], - exp_trisurf_plot['data'][1]) + #self.assert_dict_equal(test_trisurf_plot['data'][1], + # exp_trisurf_plot['data'][1]) self.assert_dict_equal(test_trisurf_plot['layout'], exp_trisurf_plot['layout']) From 577a90094a21db2264fc6263b36971515a49e8e9 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 12:39:26 -0400 Subject: [PATCH 11/26] Checks layout + data[0] --- plotly/tests/test_optional/test_figure_factory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index e02bea2ac8c..2daee991a7e 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -828,8 +828,8 @@ def test_trisurf_all_args(self): 'title': 'Fun', 'width': 500}} - #self.assert_dict_equal(test_trisurf_plot['data'][0], - # exp_trisurf_plot['data'][0]) + self.assert_dict_equal(test_trisurf_plot['data'][0], + exp_trisurf_plot['data'][0]) #self.assert_dict_equal(test_trisurf_plot['data'][1], # exp_trisurf_plot['data'][1]) From d24fcef5d91f352738ce2860885e7b03917f6c73 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 13:08:57 -0400 Subject: [PATCH 12/26] Recopy fig data without modifying anything (i.e. PEP 8, removing extra blank spaces) --- .../test_optional/test_figure_factory.py | 170 +++++++++++++++++- 1 file changed, 166 insertions(+), 4 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 2daee991a7e..66aedc196ef 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -646,7 +646,165 @@ def test_trisurf_all_args(self): height=500, width=500, aspectratio=dict(x=0.7, y=0.6, z=1.2) ) - + exp_trisurf_plot = {'data': [{'facecolor': ['rgb(127.5, 127.5, 127.5)', + 'rgb(255.0, 255.0, 255.0)', + 'rgb(127.5, 127.5, 127.5)', + 'rgb(0.0, 0.0, 0.0)', + 'rgb(127.5, 127.5, 127.5)', + 'rgb(0.0, 0.0, 0.0)', + 'rgb(127.5, 127.5, 127.5)', + 'rgb(255.0, 255.0, 255.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], + 'name': '', + 'type': 'mesh3d', + 'x': array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), + 'y': array([-0.54030231, 0. , 0.54030231, -1. , 0. , + 1. , -0.54030231, 0. , 0.54030231]), + 'z': array([ 0.84147098, -0. , -0.84147098, -0. , 0. , + 0. , -0.84147098, 0. , 0.84147098])}, + {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, + 'mode': 'lines', + 'type': 'scatter3d', + 'x': [-1.0, + 0.0, + 0.0, + -1.0, + None, + 0.0, + -1.0, + -1.0, + 0.0, + None, + 0.0, + 1.0, + 0.0, + 0.0, + None, + 1.0, + 0.0, + 1.0, + 1.0, + None, + 0.0, + -1.0, + 0.0, + 0.0, + None, + -1.0, + 0.0, + -1.0, + -1.0, + None, + 1.0, + 0.0, + 0.0, + 1.0, + None, + 0.0, + 1.0, + 1.0, + 0.0, + None], + 'y': [-1.0, + 0.0, + 0.0, + -1.0, + None, + 0.0, + -1.0, + -0.54030230586813977, + 0.0, + None, + 0.0, + 1.0, + 0.0, + 0.0, + None, + 1.0, + 0.0, + 0.54030230586813977, + 1.0, + None, + 0.0, + -1.0, + 0.0, + 0.0, + None, + -1.0, + 0.0, + -0.54030230586813977, + -1.0, + None, + 1.0, + 0.0, + 0.0, + 1.0, + None, + 0.0, + 1.0, + 0.54030230586813977, + 0.0, + None], + 'z': [-0.0, + -0.0, + 0.0, + -0.0, + None, + -0.0, + -0.0, + 0.8414709848078965, + -0.0, + None, + -0.0, + 0.0, + 0.0, + -0.0, + None, + 0.0, + -0.0, + -0.8414709848078965, + 0.0, + None, + 0.0, + -0.0, + 0.0, + 0.0, + None, + -0.0, + 0.0, + -0.8414709848078965, + -0.0, + None, + 0.0, + 0.0, + 0.0, + 0.0, + None, + 0.0, + 0.0, + 0.8414709848078965, + 0.0, + None]}], + 'layout': {'height': 500, + 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, + 'xaxis': {'backgroundcolor': 'rgb(1, 1, 1)', + 'gridcolor': 'rgb(2, 2, 2)', + 'showbackground': False, + 'zerolinecolor': 'rgb(3, 3, 3)'}, + 'yaxis': {'backgroundcolor': 'rgb(1, 1, 1)', + 'gridcolor': 'rgb(2, 2, 2)', + 'showbackground': False, + 'zerolinecolor': 'rgb(3, 3, 3)'}, + 'zaxis': {'backgroundcolor': 'rgb(1, 1, 1)', + 'gridcolor': 'rgb(2, 2, 2)', + 'showbackground': False, + 'zerolinecolor': 'rgb(3, 3, 3)'}}, + 'title': 'Fun', + 'width': 500}} + + """ exp_trisurf_plot = { 'data': [{'facecolor': ['rgb(112.5, 115.00000000000001, 196.0)', 'rgb(220.0, 220.0, 220.0)', @@ -828,11 +986,15 @@ def test_trisurf_all_args(self): 'title': 'Fun', 'width': 500}} + """ + + #self.assertEqual(test_trisurf_plot['data'], exp_trisurf_plot['data']) + + #self.assert_dict_equal(test_trisurf_plot['data'][0], + # exp_trisurf_plot['data'][0]) + self.assert_dict_equal(test_trisurf_plot['data'][0], exp_trisurf_plot['data'][0]) - #self.assert_dict_equal(test_trisurf_plot['data'][1], - # exp_trisurf_plot['data'][1]) - self.assert_dict_equal(test_trisurf_plot['layout'], exp_trisurf_plot['layout']) From 1daf31ec83dc590fedd877f0f75bab2e20cf0452 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 13:40:08 -0400 Subject: [PATCH 13/26] Added np. to array --- plotly/tests/test_optional/test_figure_factory.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 66aedc196ef..517cb1ca1b3 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -659,10 +659,10 @@ def test_trisurf_all_args(self): 'k': [4, 0, 4, 2, 4, 6, 4, 8], 'name': '', 'type': 'mesh3d', - 'x': array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), - 'y': array([-0.54030231, 0. , 0.54030231, -1. , 0. , + 'x': np.array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), + 'y': np.array([-0.54030231, 0. , 0.54030231, -1. , 0. , 1. , -0.54030231, 0. , 0.54030231]), - 'z': array([ 0.84147098, -0. , -0.84147098, -0. , 0. , + 'z': np.array([ 0.84147098, -0. , -0.84147098, -0. , 0. , 0. , -0.84147098, 0. , 0.84147098])}, {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, 'mode': 'lines', From f7c13694a401faf7d87cc95138d695b16fd16c34 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Fri, 6 May 2016 14:52:40 -0400 Subject: [PATCH 14/26] ... --- .../test_optional/test_figure_factory.py | 272 +++--------------- 1 file changed, 45 insertions(+), 227 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 517cb1ca1b3..02fe3742d03 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -646,210 +646,30 @@ def test_trisurf_all_args(self): height=500, width=500, aspectratio=dict(x=0.7, y=0.6, z=1.2) ) - exp_trisurf_plot = {'data': [{'facecolor': ['rgb(127.5, 127.5, 127.5)', - 'rgb(255.0, 255.0, 255.0)', - 'rgb(127.5, 127.5, 127.5)', - 'rgb(0.0, 0.0, 0.0)', - 'rgb(127.5, 127.5, 127.5)', - 'rgb(0.0, 0.0, 0.0)', - 'rgb(127.5, 127.5, 127.5)', - 'rgb(255.0, 255.0, 255.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], - 'name': '', - 'type': 'mesh3d', - 'x': np.array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), - 'y': np.array([-0.54030231, 0. , 0.54030231, -1. , 0. , - 1. , -0.54030231, 0. , 0.54030231]), - 'z': np.array([ 0.84147098, -0. , -0.84147098, -0. , 0. , - 0. , -0.84147098, 0. , 0.84147098])}, - {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, - 'mode': 'lines', - 'type': 'scatter3d', - 'x': [-1.0, - 0.0, - 0.0, - -1.0, - None, - 0.0, - -1.0, - -1.0, - 0.0, - None, - 0.0, - 1.0, - 0.0, - 0.0, - None, - 1.0, - 0.0, - 1.0, - 1.0, - None, - 0.0, - -1.0, - 0.0, - 0.0, - None, - -1.0, - 0.0, - -1.0, - -1.0, - None, - 1.0, - 0.0, - 0.0, - 1.0, - None, - 0.0, - 1.0, - 1.0, - 0.0, - None], - 'y': [-1.0, - 0.0, - 0.0, - -1.0, - None, - 0.0, - -1.0, - -0.54030230586813977, - 0.0, - None, - 0.0, - 1.0, - 0.0, - 0.0, - None, - 1.0, - 0.0, - 0.54030230586813977, - 1.0, - None, - 0.0, - -1.0, - 0.0, - 0.0, - None, - -1.0, - 0.0, - -0.54030230586813977, - -1.0, - None, - 1.0, - 0.0, - 0.0, - 1.0, - None, - 0.0, - 1.0, - 0.54030230586813977, - 0.0, - None], - 'z': [-0.0, - -0.0, - 0.0, - -0.0, - None, - -0.0, - -0.0, - 0.8414709848078965, - -0.0, - None, - -0.0, - 0.0, - 0.0, - -0.0, - None, - 0.0, - -0.0, - -0.8414709848078965, - 0.0, - None, - 0.0, - -0.0, - 0.0, - 0.0, - None, - -0.0, - 0.0, - -0.8414709848078965, - -0.0, - None, - 0.0, - 0.0, - 0.0, - 0.0, - None, - 0.0, - 0.0, - 0.8414709848078965, - 0.0, - None]}], - 'layout': {'height': 500, - 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, - 'xaxis': {'backgroundcolor': 'rgb(1, 1, 1)', - 'gridcolor': 'rgb(2, 2, 2)', - 'showbackground': False, - 'zerolinecolor': 'rgb(3, 3, 3)'}, - 'yaxis': {'backgroundcolor': 'rgb(1, 1, 1)', - 'gridcolor': 'rgb(2, 2, 2)', - 'showbackground': False, - 'zerolinecolor': 'rgb(3, 3, 3)'}, - 'zaxis': {'backgroundcolor': 'rgb(1, 1, 1)', - 'gridcolor': 'rgb(2, 2, 2)', - 'showbackground': False, - 'zerolinecolor': 'rgb(3, 3, 3)'}}, - 'title': 'Fun', - 'width': 500}} - - """ - exp_trisurf_plot = { - 'data': [{'facecolor': ['rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(220.0, 220.0, 220.0)', - 'rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(5.0, 10.0, 172.0)', - 'rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(5.0, 10.0, 172.0)', - 'rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(220.0, 220.0, 220.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], - 'name': '', - 'type': 'mesh3d', - 'x': np.array([-3.14159265, - 0., - 3.14159265, - -3.14159265, - 0., - 3.14159265, - -3.14159265, - 0., - 3.14159265]), - 'y': np.array([3.14159265, - -0., - -3.14159265, - -3.14159265, - 0., - 3.14159265, - 3.14159265, - -0., - -3.14159265]), - 'z': np.array([3.84734139e-16, - -0.00000000e+00, - -3.84734139e-16, - -0.00000000e+00, - 0.00000000e+00, - 0.00000000e+00, - -3.84734139e-16, - 0.00000000e+00, - 3.84734139e-16])}, - {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, - 'mode': 'lines', - 'type': 'scatter3d', - 'x': [-3.1415926535897931, + exp_trisurf_plot = {'data': [{'facecolor': ['rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(220.0, 220.0, 220.0)', + 'rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(5.0, 10.0, 172.0)', + 'rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(5.0, 10.0, 172.0)', + 'rgb(112.5, 115.00000000000001, 196.0)', + 'rgb(220.0, 220.0, 220.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], + 'name': '', + 'type': 'mesh3d', + 'x': np.array([-3.14159265, 0. , 3.14159265, -3.14159265, 0. , + 3.14159265, -3.14159265, 0. , 3.14159265]), + 'y': np.array([ 3.14159265, -0. , -3.14159265, -3.14159265, 0. , + 3.14159265, 3.14159265, -0. , -3.14159265]), + 'z': np.array([ 3.84734139e-16, -0.00000000e+00, -3.84734139e-16, + -0.00000000e+00, 0.00000000e+00, 0.00000000e+00, + -3.84734139e-16, 0.00000000e+00, 3.84734139e-16])}, + {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, + 'mode': 'lines', + 'type': 'scatter3d', + 'x': [-3.1415926535897931, 0.0, 0.0, -3.1415926535897931, @@ -889,7 +709,7 @@ def test_trisurf_all_args(self): 3.1415926535897931, 0.0, None], - 'y': [-3.1415926535897931, + 'y': [-3.1415926535897931, -0.0, 0.0, -3.1415926535897931, @@ -929,7 +749,7 @@ def test_trisurf_all_args(self): -3.1415926535897931, -0.0, None], - 'z': [-0.0, + 'z': [-0.0, -0.0, 0.0, -0.0, @@ -969,32 +789,30 @@ def test_trisurf_all_args(self): 3.8473413874435795e-16, 0.0, None]}], - 'layout': {'height': 500, - 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, - 'xaxis': {'backgroundcolor': 'rgb(1, 20, 10)', - 'gridcolor': 'rgb(0, 20, 50)', - 'showbackground': False, - 'zerolinecolor': 'rgb(25, 255, 15)'}, - 'yaxis': {'backgroundcolor': 'rgb(1, 20, 10)', - 'gridcolor': 'rgb(0, 20, 50)', - 'showbackground': False, - 'zerolinecolor': 'rgb(25, 255, 15)'}, - 'zaxis': {'backgroundcolor': 'rgb(1, 20, 10)', - 'gridcolor': 'rgb(0, 20, 50)', - 'showbackground': False, - 'zerolinecolor': 'rgb(25, 255, 15)'}}, - 'title': 'Fun', - 'width': 500}} - - """ + 'layout': {'height': 500, + 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, + 'xaxis': {'backgroundcolor': 'rgb(1, 20, 10)', + 'gridcolor': 'rgb(0, 20, 50)', + 'showbackground': False, + 'zerolinecolor': 'rgb(25, 255, 15)'}, + 'yaxis': {'backgroundcolor': 'rgb(1, 20, 10)', + 'gridcolor': 'rgb(0, 20, 50)', + 'showbackground': False, + 'zerolinecolor': 'rgb(25, 255, 15)'}, + 'zaxis': {'backgroundcolor': 'rgb(1, 20, 10)', + 'gridcolor': 'rgb(0, 20, 50)', + 'showbackground': False, + 'zerolinecolor': 'rgb(25, 255, 15)'}}, + 'title': 'Fun', + 'width': 500}} #self.assertEqual(test_trisurf_plot['data'], exp_trisurf_plot['data']) - #self.assert_dict_equal(test_trisurf_plot['data'][0], - # exp_trisurf_plot['data'][0]) - self.assert_dict_equal(test_trisurf_plot['data'][0], exp_trisurf_plot['data'][0]) + self.assert_dict_equal(test_trisurf_plot['data'][1], + exp_trisurf_plot['data'][1]) + self.assert_dict_equal(test_trisurf_plot['layout'], exp_trisurf_plot['layout']) From 59d8953a177b675da2d6374f0a10f5c25116f96d Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Sun, 8 May 2016 13:28:45 -0400 Subject: [PATCH 15/26] New expected_trisurf_plot data --- .../test_optional/test_figure_factory.py | 333 +++++++++--------- 1 file changed, 164 insertions(+), 169 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 02fe3742d03..05b160d8401 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -622,191 +622,186 @@ def test_valid_colormap(self): def test_trisurf_all_args(self): # check if trisurf plot matches with expected output - u = np.linspace(-np.pi, np.pi, 3) - v = np.linspace(-np.pi, np.pi, 3) + u = np.linspace(-1, 1, 3) + v = np.linspace(-1, 1, 3) u, v = np.meshgrid(u, v) u = u.flatten() v = v.flatten() x = u - y = u*np.cos(v) - z = u*np.sin(v) + y = v + z = u*v points2D = np.vstack([u, v]).T tri = Delaunay(points2D) simplices = tri.simplices test_trisurf_plot = tls.FigureFactory.create_trisurf( - x, y, z, simplices, colormap='Blues', + x, y, z, simplices, colormap=[(0, 0, 0), (1, 1, 1)], title='Fun', showbackground=False, - backgroundcolor='rgb(1, 20, 10)', - gridcolor='rgb(0, 20, 50)', - zerolinecolor='rgb(25, 255, 15)', + backgroundcolor='rgb(1, 1, 1)', + gridcolor='rgb(2, 2, 2)', + zerolinecolor='rgb(3, 3, 3)', height=500, width=500, aspectratio=dict(x=0.7, y=0.6, z=1.2) ) - exp_trisurf_plot = {'data': [{'facecolor': ['rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(220.0, 220.0, 220.0)', - 'rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(5.0, 10.0, 172.0)', - 'rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(5.0, 10.0, 172.0)', - 'rgb(112.5, 115.00000000000001, 196.0)', - 'rgb(220.0, 220.0, 220.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], - 'name': '', - 'type': 'mesh3d', - 'x': np.array([-3.14159265, 0. , 3.14159265, -3.14159265, 0. , - 3.14159265, -3.14159265, 0. , 3.14159265]), - 'y': np.array([ 3.14159265, -0. , -3.14159265, -3.14159265, 0. , - 3.14159265, 3.14159265, -0. , -3.14159265]), - 'z': np.array([ 3.84734139e-16, -0.00000000e+00, -3.84734139e-16, - -0.00000000e+00, 0.00000000e+00, 0.00000000e+00, - -3.84734139e-16, 0.00000000e+00, 3.84734139e-16])}, - {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, - 'mode': 'lines', - 'type': 'scatter3d', - 'x': [-3.1415926535897931, - 0.0, - 0.0, - -3.1415926535897931, - None, - 0.0, - -3.1415926535897931, - -3.1415926535897931, - 0.0, - None, - 0.0, - 3.1415926535897931, - 0.0, - 0.0, - None, - 3.1415926535897931, - 0.0, - 3.1415926535897931, - 3.1415926535897931, - None, - 0.0, - -3.1415926535897931, - 0.0, - 0.0, - None, - -3.1415926535897931, - 0.0, - -3.1415926535897931, - -3.1415926535897931, - None, - 3.1415926535897931, - 0.0, - 0.0, - 3.1415926535897931, - None, - 0.0, - 3.1415926535897931, - 3.1415926535897931, - 0.0, - None], - 'y': [-3.1415926535897931, - -0.0, - 0.0, - -3.1415926535897931, - None, - -0.0, - -3.1415926535897931, - 3.1415926535897931, - -0.0, - None, - -0.0, - 3.1415926535897931, - 0.0, - -0.0, - None, - 3.1415926535897931, - -0.0, - -3.1415926535897931, - 3.1415926535897931, - None, - -0.0, - -3.1415926535897931, - 0.0, - -0.0, - None, - -3.1415926535897931, - -0.0, - 3.1415926535897931, - -3.1415926535897931, - None, - 3.1415926535897931, - -0.0, - 0.0, - 3.1415926535897931, - None, - -0.0, - 3.1415926535897931, - -3.1415926535897931, - -0.0, - None], - 'z': [-0.0, - -0.0, - 0.0, - -0.0, - None, - -0.0, - -0.0, - 3.8473413874435795e-16, - -0.0, - None, - -0.0, - 0.0, - 0.0, - -0.0, - None, - 0.0, - -0.0, - -3.8473413874435795e-16, - 0.0, - None, - 0.0, - -0.0, - 0.0, - 0.0, - None, - -0.0, - 0.0, - -3.8473413874435795e-16, - -0.0, - None, - 0.0, - 0.0, - 0.0, - 0.0, - None, - 0.0, - 0.0, - 3.8473413874435795e-16, - 0.0, - None]}], - 'layout': {'height': 500, - 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, - 'xaxis': {'backgroundcolor': 'rgb(1, 20, 10)', - 'gridcolor': 'rgb(0, 20, 50)', - 'showbackground': False, - 'zerolinecolor': 'rgb(25, 255, 15)'}, - 'yaxis': {'backgroundcolor': 'rgb(1, 20, 10)', - 'gridcolor': 'rgb(0, 20, 50)', - 'showbackground': False, - 'zerolinecolor': 'rgb(25, 255, 15)'}, - 'zaxis': {'backgroundcolor': 'rgb(1, 20, 10)', - 'gridcolor': 'rgb(0, 20, 50)', - 'showbackground': False, - 'zerolinecolor': 'rgb(25, 255, 15)'}}, - 'title': 'Fun', - 'width': 500}} - - #self.assertEqual(test_trisurf_plot['data'], exp_trisurf_plot['data']) + + exp_trisurf_plot = {'data': [{'facecolor': ['rgb(127.5, 127.5, 127.5)', + 'rgb(255.0, 255.0, 255.0)', + 'rgb(127.5, 127.5, 127.5)', + 'rgb(0.0, 0.0, 0.0)', + 'rgb(127.5, 127.5, 127.5)', + 'rgb(0.0, 0.0, 0.0)', + 'rgb(127.5, 127.5, 127.5)', + 'rgb(255.0, 255.0, 255.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], + 'name': '', + 'type': 'mesh3d', + 'x': np.array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), + 'y': np.array([-1., -1., -1., 0., 0., 0., 1., 1., 1.]), + 'z': np.array([ 1., -0., -1., -0., 0., 0., -1., 0., 1.])}, + {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, + 'mode': 'lines', + 'type': 'scatter3d', + 'x': [-1.0, + 0.0, + 0.0, + -1.0, + None, + 0.0, + -1.0, + -1.0, + 0.0, + None, + 0.0, + 1.0, + 0.0, + 0.0, + None, + 1.0, + 0.0, + 1.0, + 1.0, + None, + 0.0, + -1.0, + 0.0, + 0.0, + None, + -1.0, + 0.0, + -1.0, + -1.0, + None, + 1.0, + 0.0, + 0.0, + 1.0, + None, + 0.0, + 1.0, + 1.0, + 0.0, + None], + 'y': [0.0, + -1.0, + 0.0, + 0.0, + None, + -1.0, + 0.0, + -1.0, + -1.0, + None, + -1.0, + 0.0, + 0.0, + -1.0, + None, + 0.0, + -1.0, + -1.0, + 0.0, + None, + 1.0, + 0.0, + 0.0, + 1.0, + None, + 0.0, + 1.0, + 1.0, + 0.0, + None, + 0.0, + 1.0, + 0.0, + 0.0, + None, + 1.0, + 0.0, + 1.0, + 1.0, + None], + 'z': [-0.0, + -0.0, + 0.0, + -0.0, + None, + -0.0, + -0.0, + 1.0, + -0.0, + None, + -0.0, + 0.0, + 0.0, + -0.0, + None, + 0.0, + -0.0, + -1.0, + 0.0, + None, + 0.0, + -0.0, + 0.0, + 0.0, + None, + -0.0, + 0.0, + -1.0, + -0.0, + None, + 0.0, + 0.0, + 0.0, + 0.0, + None, + 0.0, + 0.0, + 1.0, + 0.0, + None]}], + 'layout': {'height': 500, + 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, + 'xaxis': {'backgroundcolor': 'rgb(1, 1, 1)', + 'gridcolor': 'rgb(2, 2, 2)', + 'showbackground': False, + 'zerolinecolor': 'rgb(3, 3, 3)'}, + 'yaxis': {'backgroundcolor': 'rgb(1, 1, 1)', + 'gridcolor': 'rgb(2, 2, 2)', + 'showbackground': False, + 'zerolinecolor': 'rgb(3, 3, 3)'}, + 'zaxis': {'backgroundcolor': 'rgb(1, 1, 1)', + 'gridcolor': 'rgb(2, 2, 2)', + 'showbackground': False, + 'zerolinecolor': 'rgb(3, 3, 3)'}}, + 'title': 'Fun', + 'width': 500}} self.assert_dict_equal(test_trisurf_plot['data'][0], exp_trisurf_plot['data'][0]) From 315723f2a49099e1006eff4867f84d60f226c4cb Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Sun, 8 May 2016 21:36:14 -0400 Subject: [PATCH 16/26] Again --- plotly/tests/test_optional/test_figure_factory.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 05b160d8401..276ab35eefd 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -806,8 +806,8 @@ def test_trisurf_all_args(self): self.assert_dict_equal(test_trisurf_plot['data'][0], exp_trisurf_plot['data'][0]) - self.assert_dict_equal(test_trisurf_plot['data'][1], - exp_trisurf_plot['data'][1]) + #self.assert_dict_equal(test_trisurf_plot['data'][1], + # exp_trisurf_plot['data'][1]) self.assert_dict_equal(test_trisurf_plot['layout'], exp_trisurf_plot['layout']) From 3536f6e86a8be95e37151e6cd638fbca66d32e4d Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Sun, 8 May 2016 21:55:59 -0400 Subject: [PATCH 17/26] ..... --- plotly/tests/test_optional/test_figure_factory.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 276ab35eefd..16647878f0b 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -803,11 +803,11 @@ def test_trisurf_all_args(self): 'title': 'Fun', 'width': 500}} + self.assert_dict_equal(test_trisurf_plot['layout'], + exp_trisurf_plot['layout']) + self.assert_dict_equal(test_trisurf_plot['data'][0], exp_trisurf_plot['data'][0]) - #self.assert_dict_equal(test_trisurf_plot['data'][1], - # exp_trisurf_plot['data'][1]) - - self.assert_dict_equal(test_trisurf_plot['layout'], - exp_trisurf_plot['layout']) + self.assert_dict_equal(test_trisurf_plot['data'][1], + exp_trisurf_plot['data'][1]) From 44f4c9f96f94b5119e00ac07ba21a446c69af4c8 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Mon, 9 May 2016 16:15:15 -0400 Subject: [PATCH 18/26] Do not require initializing lists --- plotly/tools.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index f09e056181c..4c791871ac6 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1549,10 +1549,11 @@ def _tri_indices(simplices): @staticmethod def _trisurf(x, y, z, simplices, colormap=None, - plot_edges=None, Xe=None, Ye=None, Ze=None): + plot_edges=None): """ Refer to FigureFactory.create_trisurf() for docstring """ + #Xe=None, Ye=None, Ze=None # numpy import check if _numpy_imported is False: raise ImportError("FigureFactory._trisurf() requires " @@ -1582,20 +1583,20 @@ def _trisurf(x, y, z, simplices, colormap=None, # None separates data corresponding to two consecutive triangles lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - if Xe is None: - Xe = [] + #if Xe is None: + Xe = [] for array in lists_coord[0]: for item in array: Xe.append(item) - if Ye is None: - Ye = [] + #if Ye is None: + Ye = [] for array in lists_coord[1]: for item in array: Ye.append(item) - if Ze is None: - Ze = [] + #if Ze is None: + Ze = [] for array in lists_coord[2]: for item in array: Ze.append(item) From baec606edc6013d92d64b514cca9e2bf008760fa Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Mon, 9 May 2016 16:42:28 -0400 Subject: [PATCH 19/26] asd --- .../test_optional/test_figure_factory.py | 165 +++++++++++++++++- plotly/tools.py | 15 +- 2 files changed, 171 insertions(+), 9 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 16647878f0b..74b9a021e05 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -636,6 +636,9 @@ def test_trisurf_all_args(self): tri = Delaunay(points2D) simplices = tri.simplices + test_trisurf_plot = tls.FigureFactory.create_trisurf(x, y, z, simplices) + + """ test_trisurf_plot = tls.FigureFactory.create_trisurf( x, y, z, simplices, colormap=[(0, 0, 0), (1, 1, 1)], title='Fun', @@ -646,7 +649,166 @@ def test_trisurf_all_args(self): height=500, width=500, aspectratio=dict(x=0.7, y=0.6, z=1.2) ) - + """ + + 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)', + 'rgb(31.0, 119.0, 180.0)', + 'rgb(143.0, 123.0, 97.000000000000014)', + 'rgb(31.0, 119.0, 180.0)', + 'rgb(143.0, 123.0, 97.000000000000014)', + 'rgb(255.0, 127.0, 14.000000000000007)'], + '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], + 'name': '', + 'type': 'mesh3d', + 'x': np.array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), + 'y': np.array([-1., -1., -1., 0., 0., 0., 1., 1., 1.]), + 'z': np.array([ 1., -0., -1., -0., 0., 0., -1., 0., 1.])}, + {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, + 'mode': 'lines', + 'type': 'scatter3d', + 'x': [-1.0, + 0.0, + 0.0, + -1.0, + None, + 0.0, + -1.0, + -1.0, + 0.0, + None, + 0.0, + 1.0, + 0.0, + 0.0, + None, + 1.0, + 0.0, + 1.0, + 1.0, + None, + 0.0, + -1.0, + 0.0, + 0.0, + None, + -1.0, + 0.0, + -1.0, + -1.0, + None, + 1.0, + 0.0, + 0.0, + 1.0, + None, + 0.0, + 1.0, + 1.0, + 0.0, + None], + 'y': [0.0, + -1.0, + 0.0, + 0.0, + None, + -1.0, + 0.0, + -1.0, + -1.0, + None, + -1.0, + 0.0, + 0.0, + -1.0, + None, + 0.0, + -1.0, + -1.0, + 0.0, + None, + 1.0, + 0.0, + 0.0, + 1.0, + None, + 0.0, + 1.0, + 1.0, + 0.0, + None, + 0.0, + 1.0, + 0.0, + 0.0, + None, + 1.0, + 0.0, + 1.0, + 1.0, + None], + 'z': [-0.0, + -0.0, + 0.0, + -0.0, + None, + -0.0, + -0.0, + 1.0, + -0.0, + None, + -0.0, + 0.0, + 0.0, + -0.0, + None, + 0.0, + -0.0, + -1.0, + 0.0, + None, + 0.0, + -0.0, + 0.0, + 0.0, + None, + -0.0, + 0.0, + -1.0, + -0.0, + None, + 0.0, + 0.0, + 0.0, + 0.0, + None, + 0.0, + 0.0, + 1.0, + 0.0, + None]}], + 'layout': {'height': 800, + 'scene': {'aspectratio': {'x': 1, 'y': 1, 'z': 1}, + 'xaxis': {'backgroundcolor': 'rgb(230, 230, 230)', + 'gridcolor': 'rgb(255, 255, 255)', + 'showbackground': True, + 'zerolinecolor': 'rgb(255, 255, 255)'}, + 'yaxis': {'backgroundcolor': 'rgb(230, 230, 230)', + 'gridcolor': 'rgb(255, 255, 255)', + 'showbackground': True, + 'zerolinecolor': 'rgb(255, 255, 255)'}, + 'zaxis': {'backgroundcolor': 'rgb(230, 230, 230)', + 'gridcolor': 'rgb(255, 255, 255)', + 'showbackground': True, + 'zerolinecolor': 'rgb(255, 255, 255)'}}, + 'title': 'Trisurf Plot', + 'width': 800}} + + + """ exp_trisurf_plot = {'data': [{'facecolor': ['rgb(127.5, 127.5, 127.5)', 'rgb(255.0, 255.0, 255.0)', 'rgb(127.5, 127.5, 127.5)', @@ -802,6 +964,7 @@ def test_trisurf_all_args(self): 'zerolinecolor': 'rgb(3, 3, 3)'}}, 'title': 'Fun', 'width': 500}} + """ self.assert_dict_equal(test_trisurf_plot['layout'], exp_trisurf_plot['layout']) diff --git a/plotly/tools.py b/plotly/tools.py index 4c791871ac6..f09e056181c 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1549,11 +1549,10 @@ def _tri_indices(simplices): @staticmethod def _trisurf(x, y, z, simplices, colormap=None, - plot_edges=None): + plot_edges=None, Xe=None, Ye=None, Ze=None): """ Refer to FigureFactory.create_trisurf() for docstring """ - #Xe=None, Ye=None, Ze=None # numpy import check if _numpy_imported is False: raise ImportError("FigureFactory._trisurf() requires " @@ -1583,20 +1582,20 @@ def _trisurf(x, y, z, simplices, colormap=None, # None separates data corresponding to two consecutive triangles lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - #if Xe is None: - Xe = [] + if Xe is None: + Xe = [] for array in lists_coord[0]: for item in array: Xe.append(item) - #if Ye is None: - Ye = [] + if Ye is None: + Ye = [] for array in lists_coord[1]: for item in array: Ye.append(item) - #if Ze is None: - Ze = [] + if Ze is None: + Ze = [] for array in lists_coord[2]: for item in array: Ze.append(item) From f77b8e6dc74c41f5133ba5ee11cc5d75c70154d7 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Mon, 9 May 2016 19:17:21 -0400 Subject: [PATCH 20/26] printing both expected and test plots back to back --- plotly/tests/test_optional/test_figure_factory.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 74b9a021e05..017b9b48cbd 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -966,6 +966,10 @@ def test_trisurf_all_args(self): 'width': 500}} """ + print(test_trisurf_plot) + + print(exp_trisurf_plot) + self.assert_dict_equal(test_trisurf_plot['layout'], exp_trisurf_plot['layout']) From 862298da092fd09abc69f9703b8c0765a2ca7625 Mon Sep 17 00:00:00 2001 From: Andrew Seier Date: Mon, 9 May 2016 22:00:54 -0700 Subject: [PATCH 21/26] In python 3 `map` is a generator, `list()` it! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In python 2, you typically get `list` objects. For efficiency (AFAIK) in python 3 you’ll get a generator. Note that you can’t iterate through a generator more than once though! --- plotly/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/tools.py b/plotly/tools.py index f09e056181c..08648a79cd0 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1562,7 +1562,7 @@ def _trisurf(x, y, z, simplices, colormap=None, points3D = np.vstack((x, y, z)).T # vertices of the surface triangles - tri_vertices = map(lambda index: points3D[index], simplices) + tri_vertices = list(map(lambda index: points3D[index], simplices)) # mean values of z-coordinates of triangle vertices zmean = [np.mean(tri[:, 2]) for tri in tri_vertices] min_zmean = np.min(zmean) From be9112ce05bb672fbb087ee3219fa030aa9ea37e Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Tue, 10 May 2016 09:44:59 -0400 Subject: [PATCH 22/26] Removed extraneous comment//verified Pep-8 is satisfied --- plotly/tools.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index f09e056181c..fa8e9119b78 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1561,8 +1561,8 @@ def _trisurf(x, y, z, simplices, colormap=None, from plotly.graph_objs import graph_objs points3D = np.vstack((x, y, z)).T - # vertices of the surface triangles - tri_vertices = map(lambda index: points3D[index], simplices) + # list of the surface triangles vertices + tri_vertices = list(map(lambda index: points3D[index], simplices)) # mean values of z-coordinates of triangle vertices zmean = [np.mean(tri[:, 2]) for tri in tri_vertices] min_zmean = np.min(zmean) @@ -1600,9 +1600,6 @@ def _trisurf(x, y, z, simplices, colormap=None, for item in array: Ze.append(item) - #Xe, Ye, Ze = ([reduce(lambda x, y: x+y, - # lists_coord[k]) for k in range(3)]) - # define the lines to be plotted lines = graph_objs.Scatter3d( x=Xe, y=Ye, z=Ze, mode='lines', From b1cb22c33faa77995d02663b739677fc0636f4d3 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Tue, 10 May 2016 10:16:24 -0400 Subject: [PATCH 23/26] Fixed up a comment --- plotly/tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/tools.py b/plotly/tools.py index 2d63c330d77..1c3567e3487 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1600,7 +1600,7 @@ def _trisurf(x, y, z, simplices, colormap=None, for item in array: Ze.append(item) - # define the lines to be plotted + # define the lines for plotting lines = graph_objs.Scatter3d( x=Xe, y=Ye, z=Ze, mode='lines', line=graph_objs.Line(color='rgb(50, 50, 50)', From 890450831d154ad043af77be39da54e283728a37 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Tue, 10 May 2016 16:03:22 -0400 Subject: [PATCH 24/26] Fixed Python doc strings and other formatting/naming/Pep8 --- .../test_optional/test_figure_factory.py | 374 +++--------------- plotly/tools.py | 84 ++-- 2 files changed, 98 insertions(+), 360 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 017b9b48cbd..571196fae32 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -636,22 +636,14 @@ def test_trisurf_all_args(self): tri = Delaunay(points2D) simplices = tri.simplices - test_trisurf_plot = tls.FigureFactory.create_trisurf(x, y, z, simplices) - - """ test_trisurf_plot = tls.FigureFactory.create_trisurf( - x, y, z, simplices, colormap=[(0, 0, 0), (1, 1, 1)], - title='Fun', - showbackground=False, - backgroundcolor='rgb(1, 1, 1)', - gridcolor='rgb(2, 2, 2)', - zerolinecolor='rgb(3, 3, 3)', - height=500, width=500, - aspectratio=dict(x=0.7, y=0.6, z=1.2) + x, y, z, simplices ) - """ - exp_trisurf_plot = {'data': [{'facecolor': ['rgb(143.0, 123.0, 97.000000000000014)', + 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)', 'rgb(31.0, 119.0, 180.0)', @@ -659,316 +651,52 @@ def test_trisurf_all_args(self): 'rgb(31.0, 119.0, 180.0)', 'rgb(143.0, 123.0, 97.000000000000014)', 'rgb(255.0, 127.0, 14.000000000000007)'], - '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], - 'name': '', - 'type': 'mesh3d', - 'x': np.array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), - 'y': np.array([-1., -1., -1., 0., 0., 0., 1., 1., 1.]), - 'z': np.array([ 1., -0., -1., -0., 0., 0., -1., 0., 1.])}, - {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, - 'mode': 'lines', - 'type': 'scatter3d', - 'x': [-1.0, - 0.0, - 0.0, - -1.0, - None, - 0.0, - -1.0, - -1.0, - 0.0, - None, - 0.0, - 1.0, - 0.0, - 0.0, - None, - 1.0, - 0.0, - 1.0, - 1.0, - None, - 0.0, - -1.0, - 0.0, - 0.0, - None, - -1.0, - 0.0, - -1.0, - -1.0, - None, - 1.0, - 0.0, - 0.0, - 1.0, - None, - 0.0, - 1.0, - 1.0, - 0.0, - None], - 'y': [0.0, - -1.0, - 0.0, - 0.0, - None, - -1.0, - 0.0, - -1.0, - -1.0, - None, - -1.0, - 0.0, - 0.0, - -1.0, - None, - 0.0, - -1.0, - -1.0, - 0.0, - None, - 1.0, - 0.0, - 0.0, - 1.0, - None, - 0.0, - 1.0, - 1.0, - 0.0, - None, - 0.0, - 1.0, - 0.0, - 0.0, - None, - 1.0, - 0.0, - 1.0, - 1.0, - None], - 'z': [-0.0, - -0.0, - 0.0, - -0.0, - None, - -0.0, - -0.0, - 1.0, - -0.0, - None, - -0.0, - 0.0, - 0.0, - -0.0, - None, - 0.0, - -0.0, - -1.0, - 0.0, - None, - 0.0, - -0.0, - 0.0, - 0.0, - None, - -0.0, - 0.0, - -1.0, - -0.0, - None, - 0.0, - 0.0, - 0.0, - 0.0, - None, - 0.0, - 0.0, - 1.0, - 0.0, - None]}], - 'layout': {'height': 800, - 'scene': {'aspectratio': {'x': 1, 'y': 1, 'z': 1}, - 'xaxis': {'backgroundcolor': 'rgb(230, 230, 230)', - 'gridcolor': 'rgb(255, 255, 255)', - 'showbackground': True, - 'zerolinecolor': 'rgb(255, 255, 255)'}, - 'yaxis': {'backgroundcolor': 'rgb(230, 230, 230)', - 'gridcolor': 'rgb(255, 255, 255)', - 'showbackground': True, - 'zerolinecolor': 'rgb(255, 255, 255)'}, - 'zaxis': {'backgroundcolor': 'rgb(230, 230, 230)', - 'gridcolor': 'rgb(255, 255, 255)', - 'showbackground': True, - 'zerolinecolor': 'rgb(255, 255, 255)'}}, - 'title': 'Trisurf Plot', - 'width': 800}} - - - """ - exp_trisurf_plot = {'data': [{'facecolor': ['rgb(127.5, 127.5, 127.5)', - 'rgb(255.0, 255.0, 255.0)', - 'rgb(127.5, 127.5, 127.5)', - 'rgb(0.0, 0.0, 0.0)', - 'rgb(127.5, 127.5, 127.5)', - 'rgb(0.0, 0.0, 0.0)', - 'rgb(127.5, 127.5, 127.5)', - 'rgb(255.0, 255.0, 255.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], - 'name': '', - 'type': 'mesh3d', - 'x': np.array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), - 'y': np.array([-1., -1., -1., 0., 0., 0., 1., 1., 1.]), - 'z': np.array([ 1., -0., -1., -0., 0., 0., -1., 0., 1.])}, - {'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, - 'mode': 'lines', - 'type': 'scatter3d', - 'x': [-1.0, - 0.0, - 0.0, - -1.0, - None, - 0.0, - -1.0, - -1.0, - 0.0, - None, - 0.0, - 1.0, - 0.0, - 0.0, - None, - 1.0, - 0.0, - 1.0, - 1.0, - None, - 0.0, - -1.0, - 0.0, - 0.0, - None, - -1.0, - 0.0, - -1.0, - -1.0, - None, - 1.0, - 0.0, - 0.0, - 1.0, - None, - 0.0, - 1.0, - 1.0, - 0.0, - None], - 'y': [0.0, - -1.0, - 0.0, - 0.0, - None, - -1.0, - 0.0, - -1.0, - -1.0, - None, - -1.0, - 0.0, - 0.0, - -1.0, - None, - 0.0, - -1.0, - -1.0, - 0.0, - None, - 1.0, - 0.0, - 0.0, - 1.0, - None, - 0.0, - 1.0, - 1.0, - 0.0, - None, - 0.0, - 1.0, - 0.0, - 0.0, - None, - 1.0, - 0.0, - 1.0, - 1.0, - None], - 'z': [-0.0, - -0.0, - 0.0, - -0.0, - None, - -0.0, - -0.0, - 1.0, - -0.0, - None, - -0.0, - 0.0, - 0.0, - -0.0, - None, - 0.0, - -0.0, - -1.0, - 0.0, - None, - 0.0, - -0.0, - 0.0, - 0.0, - None, - -0.0, - 0.0, - -1.0, - -0.0, - None, - 0.0, - 0.0, - 0.0, - 0.0, - None, - 0.0, - 0.0, - 1.0, - 0.0, - None]}], - 'layout': {'height': 500, - 'scene': {'aspectratio': {'x': 0.7, 'y': 0.6, 'z': 1.2}, - 'xaxis': {'backgroundcolor': 'rgb(1, 1, 1)', - 'gridcolor': 'rgb(2, 2, 2)', - 'showbackground': False, - 'zerolinecolor': 'rgb(3, 3, 3)'}, - 'yaxis': {'backgroundcolor': 'rgb(1, 1, 1)', - 'gridcolor': 'rgb(2, 2, 2)', - 'showbackground': False, - 'zerolinecolor': 'rgb(3, 3, 3)'}, - 'zaxis': {'backgroundcolor': 'rgb(1, 1, 1)', - 'gridcolor': 'rgb(2, 2, 2)', - 'showbackground': False, - 'zerolinecolor': 'rgb(3, 3, 3)'}}, - 'title': 'Fun', - 'width': 500}} - """ - - print(test_trisurf_plot) - - print(exp_trisurf_plot) + '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], + 'name': '', + 'type': 'mesh3d', + 'x': np.array([-1., 0., 1., -1., 0., 1., -1., 0., 1.]), + 'y': np.array([-1., -1., -1., 0., 0., 0., 1., 1., 1.]), + 'z': np.array([ 1., -0., -1., -0., 0., 0., -1., 0., 1.]) + }, + { + 'line': {'color': 'rgb(50, 50, 50)', 'width': 1.5}, + 'mode': 'lines', + 'type': 'scatter3d', + 'x': [-1.0, 0.0, 0.0, -1.0, None, 0.0, -1.0, -1.0, 0.0, None, + 0.0, 1.0, 0.0, 0.0, None, 1.0, 0.0, 1.0, 1.0, None, 0.0, + -1.0, 0.0, 0.0, None, -1.0, 0.0, -1.0, -1.0, None, 1.0, + 0.0, 0.0, 1.0, None, 0.0, 1.0, 1.0, 0.0, None], + 'y': [0.0, -1.0, 0.0, 0.0, None, -1.0, 0.0, -1.0, -1.0, None, + -1.0, 0.0, 0.0, -1.0, None, 0.0, -1.0, -1.0, 0.0, None, + 1.0, 0.0, 0.0, 1.0, None, 0.0, 1.0, 1.0, 0.0, None, 0.0, + 1.0, 0.0, 0.0, None, 1.0, 0.0, 1.0, 1.0, None], + 'z': [-0.0, -0.0, 0.0, -0.0, None, -0.0, -0.0, 1.0, -0.0, + None, -0.0, 0.0, 0.0, -0.0, None, 0.0, -0.0, -1.0, 0.0, + None, 0.0, -0.0, 0.0, 0.0, None, -0.0, 0.0, -1.0, -0.0, + None, 0.0, 0.0, 0.0, 0.0, None, 0.0, 0.0, 1.0, 0.0, None] + } + ], + 'layout': { + 'height': 800, + 'scene': {'aspectratio': {'x': 1, 'y': 1, 'z': 1}, + 'xaxis': {'backgroundcolor': 'rgb(230, 230, 230)', + 'gridcolor': 'rgb(255, 255, 255)', + 'showbackground': True, + 'zerolinecolor': 'rgb(255, 255, 255)'}, + 'yaxis': {'backgroundcolor': 'rgb(230, 230, 230)', + 'gridcolor': 'rgb(255, 255, 255)', + 'showbackground': True, + 'zerolinecolor': 'rgb(255, 255, 255)'}, + 'zaxis': {'backgroundcolor': 'rgb(230, 230, 230)', + 'gridcolor': 'rgb(255, 255, 255)', + 'showbackground': True, + 'zerolinecolor': 'rgb(255, 255, 255)'}}, + 'title': 'Trisurf Plot', + 'width': 800 + } + } self.assert_dict_equal(test_trisurf_plot['layout'], exp_trisurf_plot['layout']) diff --git a/plotly/tools.py b/plotly/tools.py index 1c3567e3487..ff0c34886d9 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1451,21 +1451,24 @@ class FigureFactory(object): @staticmethod def _unlabel_rgb(colors): """ + Takes rgb colors 'rgb(a, b, c)' and returns the tuples (a, b, c) + This function takes a list of two 'rgb(a, b, c)' color strings and returns a list of the color tuples in tuple form without the 'rgb' label. In particular, the output is a list of two tuples of the form (a, b, c) + """ unlabelled_colors = [] - for color in colors: + for character in colors: str_vals = '' - for index in range(len(color)): + for index in range(len(character)): try: - float(color[index]) - str_vals = str_vals + color[index] + float(character[index]) + str_vals = str_vals + character[index] except ValueError: - if (color[index] == ',') or (color[index] == '.'): - str_vals = str_vals + color[index] + if (character[index] == ',') or (character[index] == '.'): + str_vals = str_vals + character[index] str_vals = str_vals + ',' numbers = [] @@ -1482,28 +1485,34 @@ def _unlabel_rgb(colors): return unlabelled_colors @staticmethod - def _find_intermediate_color(tuple1, tuple2, t): + def _find_intermediate_color(lowcolor, highcolor, intermed): """ + Returns the color at a given distance between two colors + This function takes two color tuples, where each element is between 0 - and 1, along with a value 0 < t < 1 and returns a color that is - t percent from tuple1 to tuple2, where t = 1 is 100 percent + and 1, along with a value 0 < intermed < 1 and returns a color that is + intermed-percent from lowcolor to highcolor + """ - diff_0 = float(tuple2[0] - tuple1[0]) - diff_1 = float(tuple2[1] - tuple1[1]) - diff_2 = float(tuple2[2] - tuple1[2]) + diff_0 = float(highcolor[0] - lowcolor[0]) + diff_1 = float(highcolor[1] - lowcolor[1]) + diff_2 = float(highcolor[2] - lowcolor[2]) - new_tuple = (tuple1[0] + t*diff_0, - tuple1[1] + t*diff_1, - tuple1[2] + t*diff_2) + new_tuple = (lowcolor[0] + intermed*diff_0, + lowcolor[1] + intermed*diff_1, + lowcolor[2] + intermed*diff_2) return new_tuple @staticmethod def _unconvert_from_RGB_255(colors): """ + Return a tuple where each element gets divided by 255 + Takes a list of color tuples where each element is between 0 and 255 and returns the same list where each tuple element is normalized to be between 0 and 1 + """ un_rgb_colors = [] for color in colors: @@ -1518,10 +1527,13 @@ def _unconvert_from_RGB_255(colors): @staticmethod def _map_z2color(zval, colormap, vmin, vmax): """ + Returns the color corresponding zval's place between vmin and vmax + This function takes a z value (zval) along with a colormap and a minimum (vmin) and maximum (vmax) range of possible z values for the given parametrized surface. It returns an rgb color based on the relative position of zval between vmin and vmax + """ if vmin >= vmax: raise exceptions.PlotlyError("Incorrect relation between vmin " @@ -1542,14 +1554,13 @@ def _map_z2color(zval, colormap, vmin, vmax): @staticmethod def _tri_indices(simplices): """ - Returns a triplet of 3 lists such that each list contains the kth - index of each triplet of the simplicies, where k is 0, 1 and 2 + Returns a triplet of lists containing simplex coordinates """ return ([triplet[c] for triplet in simplices] for c in range(3)) @staticmethod def _trisurf(x, y, z, simplices, colormap=None, - plot_edges=None, Xe=None, Ye=None, Ze=None): + plot_edges=None, x_edge=None, y_edge=None, z_edge=None): """ Refer to FigureFactory.create_trisurf() for docstring """ @@ -1569,40 +1580,40 @@ def _trisurf(x, y, z, simplices, colormap=None, max_zmean = np.max(zmean) facecolor = ([FigureFactory._map_z2color(zz, colormap, min_zmean, max_zmean) for zz in zmean]) - I, J, K = FigureFactory._tri_indices(simplices) + ii, jj, kk = FigureFactory._tri_indices(simplices) triangles = graph_objs.Mesh3d(x=x, y=y, z=z, facecolor=facecolor, - i=I, j=J, k=K, name='') + i=ii, j=jj, k=kk, name='') if plot_edges is None: # the triangle sides are not plotted return graph_objs.Data([triangles]) - # define the lists Xe, Ye, Ze, of x, y, resp z coordinates of - # edge end points for each triangle + # define the lists x_edge, y_edge and z_edge, of x, y, resp z + # coordinates of edge end points for each triangle # None separates data corresponding to two consecutive triangles lists_coord = ([[[T[k % 3][c] for k in range(4)]+[None] for T in tri_vertices] for c in range(3)]) - if Xe is None: - Xe = [] + if x_edge is None: + x_edge = [] for array in lists_coord[0]: for item in array: - Xe.append(item) + x_edge.append(item) - if Ye is None: - Ye = [] + if y_edge is None: + y_edge = [] for array in lists_coord[1]: for item in array: - Ye.append(item) + y_edge.append(item) - if Ze is None: - Ze = [] + if z_edge is None: + z_edge = [] for array in lists_coord[2]: for item in array: - Ze.append(item) + z_edge.append(item) # define the lines for plotting lines = graph_objs.Scatter3d( - x=Xe, y=Ye, z=Ze, mode='lines', + x=x_edge, y=y_edge, z=z_edge, mode='lines', line=graph_objs.Line(color='rgb(50, 50, 50)', width=1.5) ) @@ -1773,13 +1784,12 @@ def create_trisurf(x, y, z, simplices, colormap=None, if isinstance(colormap, str): if colormap not in plotly_scales: + scale_keys = list(plotly_scales.keys()) raise exceptions.PlotlyError("You must pick a valid " "plotly colorscale " - "name from {}" - .format( - list(plotly_scales.keys()) - ) - ) + "name from " + "{}".format(scale_keys)) + colormap = [plotly_scales[colormap][0], plotly_scales[colormap][1]] colormap = FigureFactory._unlabel_rgb(colormap) From 581f8bacb367712997d0f6f49ed8187481f5ebf8 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Wed, 11 May 2016 13:29:45 -0400 Subject: [PATCH 25/26] Added custom coloring option --- plotly/tools.py | 75 +++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 67 insertions(+), 8 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index ff0c34886d9..4ae25d0df3c 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1559,7 +1559,7 @@ def _tri_indices(simplices): return ([triplet[c] for triplet in simplices] for c in range(3)) @staticmethod - def _trisurf(x, y, z, simplices, colormap=None, + def _trisurf(x, y, z, simplices, colormap=None, dist_func=None, plot_edges=None, x_edge=None, y_edge=None, z_edge=None): """ Refer to FigureFactory.create_trisurf() for docstring @@ -1574,12 +1574,27 @@ def _trisurf(x, y, z, simplices, colormap=None, # vertices of the surface triangles tri_vertices = list(map(lambda index: points3D[index], simplices)) - # mean values of z-coordinates of triangle vertices - zmean = [np.mean(tri[:, 2]) for tri in tri_vertices] - min_zmean = np.min(zmean) - max_zmean = np.max(zmean) - facecolor = ([FigureFactory._map_z2color(zz, colormap, min_zmean, - max_zmean) for zz in zmean]) + + if not dist_func: + # mean values of z-coordinates of triangle vertices + mean_dists = [np.mean(tri[:, 2]) for tri in tri_vertices] + else: + # apply user inputted function to calculate + # custom coloring for triangle vertices + mean_dists = [] + + for triangle in tri_vertices: + dists = [] + for vertex in triangle: + dist = dist_func(vertex[0], vertex[1], vertex[2]) + dists.append(dist) + + mean_dists.append(np.mean(dists)) + + min_mean_dists = np.min(mean_dists) + max_mean_dists = np.max(mean_dists) + facecolor = ([FigureFactory._map_z2color(zz, colormap, min_mean_dists, + max_mean_dists) for zz in mean_dists]) ii, jj, kk = FigureFactory._tri_indices(simplices) triangles = graph_objs.Mesh3d(x=x, y=y, z=z, facecolor=facecolor, @@ -1622,7 +1637,7 @@ def _trisurf(x, y, z, simplices, colormap=None, @staticmethod def create_trisurf(x, y, z, simplices, colormap=None, - title='Trisurf Plot', + dist_func=None, title='Trisurf Plot', showbackground=True, backgroundcolor='rgb(230, 230, 230)', gridcolor='rgb(255, 255, 255)', @@ -1642,6 +1657,11 @@ def create_trisurf(x, y, z, simplices, colormap=None, containing 2 triplets. These triplets must be of the form (a,b,c) or 'rgb(x,y,z)' where a,b,c belong to the interval [0,1] and x,y,z belong to [0,255] + :param (function) dist_func: The function that determines how the + coloring of the surface changes. It takes 3 arguments x, y, z and + must return a formula of these variables which can include numpy + functions (eg. np.sqrt). If set to None, color will only depend on + the z axis. :param (str) title: title of the plot :param (bool) showbackground: makes background in plot visible :param (str) backgroundcolor: color of background. Takes a string of @@ -1755,6 +1775,44 @@ def create_trisurf(x, y, z, simplices, colormap=None, # Plot the data py.iplot(fig1, filename='Trisurf Plot - Mobius Band') ``` + + Example 4: Using a Custom Colormap Function with Light Cone + ``` + # Necessary Imports for Trisurf + import numpy as np + from scipy.spatial import Delaunay + + import plotly.plotly as py + from plotly.tools import FigureFactory as FF + from plotly.graph_objs import graph_objs + + # Make data for plot + u=np.linspace(-np.pi, np.pi, 30) + v=np.linspace(-np.pi, np.pi, 30) + u,v=np.meshgrid(u,v) + u=u.flatten() + v=v.flatten() + + x = u + y = u*np.cos(v) + z = u*np.sin(v) + + points2D = np.vstack([u,v]).T + tri = Delaunay(points2D) + simplices = tri.simplices + + # Define distance function + def dist_origin(x, y, z): + return np.sqrt((1.0 * x)**2 + (1.0 * y)**2 + (1.0 * z)**2) + + # Create a figure + fig1 = FF.create_trisurf(x=x, y=y, z=z, + colormap="Blues", + simplices=simplices, + dist_func=dist_origin) + # Plot the data + py.iplot(fig1, filename='Trisurf Plot - Custom Coloring') + ``` """ from plotly.graph_objs import graph_objs plotly_scales = {'Greys': ['rgb(0,0,0)', 'rgb(255,255,255)'], @@ -1826,6 +1884,7 @@ def create_trisurf(x, y, z, simplices, colormap=None, "exceed 1.0.") data1 = FigureFactory._trisurf(x, y, z, simplices, + dist_func=dist_func, colormap=colormap, plot_edges=True) axis = dict( From 4893444d7f1e44d4f8d47b9751157fd848ec6351 Mon Sep 17 00:00:00 2001 From: Adam Kulidjian Date: Thu, 12 May 2016 18:34:52 -0400 Subject: [PATCH 26/26] Fixed stuff --- plotly/tests/test_optional/test_figure_factory.py | 3 +-- plotly/tools.py | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plotly/tests/test_optional/test_figure_factory.py b/plotly/tests/test_optional/test_figure_factory.py index 800123cff2f..f39c5c8f04e 100644 --- a/plotly/tests/test_optional/test_figure_factory.py +++ b/plotly/tests/test_optional/test_figure_factory.py @@ -880,7 +880,7 @@ def test_scatter_plot_matrix(self): columns=['Numbers', 'Fruit']) test_scatter_plot_matrix = tls.FigureFactory.create_scatterplotmatrix( - df, diag='scatter', height=1000, width=1000, size=13, + df=df, diag='scatter', height=1000, width=1000, size=13, title='Scatterplot Matrix', use_theme=False ) @@ -1012,4 +1012,3 @@ def test_scatter_plot_matrix_kwargs(self): self.assert_dict_equal(test_scatter_plot_matrix['layout'], exp_scatter_plot_matrix['layout']) - diff --git a/plotly/tools.py b/plotly/tools.py index 6a43abdd2b8..0a109d08c37 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -1875,6 +1875,7 @@ def dist_origin(x, y, z): ) return graph_objs.Figure(data=data1, layout=layout) + @staticmethod def _scatterplot(dataframe, headers, diag, size, height, width,