topologicpy 0.7.46__py3-none-any.whl → 0.7.47__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
topologicpy/Graph.py CHANGED
@@ -7995,9 +7995,39 @@ class Graph:
7995
7995
  return shortestPaths
7996
7996
 
7997
7997
  @staticmethod
7998
- def Show(graph, vertexColor="black", vertexSize=6, vertexLabelKey=None, vertexGroupKey=None, vertexGroups=[], showVertices=True, showVertexLegend=False, edgeColor="black", edgeWidth=1, edgeLabelKey=None, edgeGroupKey=None, edgeGroups=[], showEdges=True, showEdgeLegend=False, colorScale='viridis', renderer=None,
7999
- width=950, height=500, xAxis=False, yAxis=False, zAxis=False, axisSize=1, backgroundColor='rgba(0,0,0,0)', marginLeft=0, marginRight=0, marginTop=20, marginBottom=0,
8000
- camera=[-1.25, -1.25, 1.25], center=[0, 0, 0], up=[0, 0, 1], projection="perspective", tolerance=0.0001):
7998
+ def Show(graph, vertexColor="black",
7999
+ vertexSize=6,
8000
+ vertexLabelKey=None,
8001
+ vertexGroupKey=None,
8002
+ vertexGroups=[],
8003
+ showVertices=True,
8004
+ showVertexLabels=False,
8005
+ showVertexLegend=False,
8006
+ edgeColor="black",
8007
+ edgeWidth=1,
8008
+ edgeLabelKey=None,
8009
+ edgeGroupKey=None,
8010
+ edgeGroups=[],
8011
+ showEdges=True,
8012
+ showEdgeLabels=False,
8013
+ showEdgeLegend=False,
8014
+ colorScale='viridis',
8015
+ renderer=None,
8016
+ width=950,
8017
+ height=500,
8018
+ xAxis=False,
8019
+ yAxis=False,
8020
+ zAxis=False,
8021
+ axisSize=1,
8022
+ backgroundColor='rgba(0,0,0,0)',
8023
+ marginLeft=0,
8024
+ marginRight=0,
8025
+ marginTop=20,
8026
+ marginBottom=0,
8027
+ camera=[-1.25, -1.25, 1.25],
8028
+ center=[0, 0, 0], up=[0, 0, 1],
8029
+ projection="perspective",
8030
+ tolerance=0.0001):
8001
8031
  """
8002
8032
  Shows the graph using Plotly.
8003
8033
 
@@ -8023,6 +8053,8 @@ class Graph:
8023
8053
  The list of vertex groups against which to index the color of the vertex. The default is [].
8024
8054
  showVertices : bool , optional
8025
8055
  If set to True the vertices will be drawn. Otherwise, they will not be drawn. The default is True.
8056
+ showVertexLabels : bool , optional
8057
+ If set to True, the vertex labels are shown permenantely on screen. Otherwise, they are not. The default is False.
8026
8058
  showVertexLegend : bool , optional
8027
8059
  If set to True the vertex legend will be drawn. Otherwise, it will not be drawn. The default is False.
8028
8060
  edgeColor : str , optional
@@ -8043,6 +8075,8 @@ class Graph:
8043
8075
  The list of edge groups against which to index the color of the edge. The default is [].
8044
8076
  showEdges : bool , optional
8045
8077
  If set to True the edges will be drawn. Otherwise, they will not be drawn. The default is True.
8078
+ showEdgeLabels : bool , optional
8079
+ If set to True, the edge labels are shown permenantely on screen. Otherwise, they are not. The default is False.
8046
8080
  showEdgeLegend : bool , optional
8047
8081
  If set to True the edge legend will be drawn. Otherwise, it will not be drawn. The default is False.
8048
8082
  colorScale : str , optional
@@ -8101,7 +8135,7 @@ class Graph:
8101
8135
  print("Graph.Show - Error: The input graph is not a valid graph. Returning None.")
8102
8136
  return None
8103
8137
 
8104
- data= Plotly.DataByGraph(graph, vertexColor=vertexColor, vertexSize=vertexSize, vertexLabelKey=vertexLabelKey, vertexGroupKey=vertexGroupKey, vertexGroups=vertexGroups, showVertices=showVertices, showVertexLegend=showVertexLegend, edgeColor=edgeColor, edgeWidth=edgeWidth, edgeLabelKey=edgeLabelKey, edgeGroupKey=edgeGroupKey, edgeGroups=edgeGroups, showEdges=showEdges, showEdgeLegend=showEdgeLegend, colorScale=colorScale)
8138
+ data= Plotly.DataByGraph(graph, vertexColor=vertexColor, vertexSize=vertexSize, vertexLabelKey=vertexLabelKey, vertexGroupKey=vertexGroupKey, vertexGroups=vertexGroups, showVertices=showVertices, showVertexLabels=showVertexLabels, showVertexLegend=showVertexLegend, edgeColor=edgeColor, edgeWidth=edgeWidth, edgeLabelKey=edgeLabelKey, edgeGroupKey=edgeGroupKey, edgeGroups=edgeGroups, showEdges=showEdges, showEdgeLabels=showEdgeLabels, showEdgeLegend=showEdgeLegend, colorScale=colorScale)
8105
8139
  fig = Plotly.FigureByData(data, width=width, height=height, xAxis=xAxis, yAxis=yAxis, zAxis=zAxis, axisSize=axisSize, backgroundColor=backgroundColor,
8106
8140
  marginLeft=marginLeft, marginRight=marginRight, marginTop=marginTop, marginBottom=marginBottom, tolerance=tolerance)
8107
8141
  Plotly.Show(fig, renderer=renderer, camera=camera, center=center, up=up, projection=projection)
topologicpy/Plotly.py CHANGED
@@ -279,6 +279,7 @@ class Plotly:
279
279
  vertexGroupKey: str = None,
280
280
  vertexGroups: list = [],
281
281
  showVertices: bool = True,
282
+ showVertexLabels: bool = False,
282
283
  showVertexLegend: bool = False,
283
284
  edgeColor: str = "black",
284
285
  edgeWidth: float = 1,
@@ -286,6 +287,7 @@ class Plotly:
286
287
  edgeGroupKey: str = None,
287
288
  edgeGroups: list = [],
288
289
  showEdges: bool = True,
290
+ showEdgeLabels: bool = False,
289
291
  showEdgeLegend: bool = False,
290
292
  colorScale: str = "viridis",
291
293
  mantissa: int = 6):
@@ -314,6 +316,8 @@ class Plotly:
314
316
  The list of vertex groups against which to index the color of the vertex. The default is [].
315
317
  showVertices : bool , optional
316
318
  If set to True the vertices will be drawn. Otherwise, they will not be drawn. The default is True.
319
+ showVertexLabels : bool , optional
320
+ If set to True, the vertex labels are shown permenantely on screen. Otherwise, they are not. The default is False.
317
321
  showVertexLegend : bool , optional
318
322
  If set to True the vertex legend will be drawn. Otherwise, it will not be drawn. The default is False.
319
323
  edgeColor : str , optional
@@ -334,6 +338,8 @@ class Plotly:
334
338
  The list of groups to use for indexing the color of edges. The default is None.
335
339
  showEdges : bool , optional
336
340
  If set to True the edges will be drawn. Otherwise, they will not be drawn. The default is True.
341
+ showEdgeLabels : bool , optional
342
+ If set to True, the edge labels are shown permenantely on screen. Otherwise, they are not. The default is False.
337
343
  showEdgeLegend : bool , optional
338
344
  If set to True the edge legend will be drawn. Otherwise, it will not be drawn. The default is False.
339
345
  colorScale : str , optional
@@ -376,11 +382,11 @@ class Plotly:
376
382
  v_groupList.append(vertexGroups.index(v_group))
377
383
  except:
378
384
  v_groupList.append(len(vertexGroups))
379
- if not v_label == "" and not v_group == "":
380
- if v_group == 0:
381
- v_label = v_label+" (0)"
382
- else:
383
- v_label = v_label+" ("+str(v_group)+")"
385
+ # if not v_label == "" and not v_group == "":
386
+ # if v_group == 0:
387
+ # v_label = v_label+" (0)"
388
+ # else:
389
+ # v_label = v_label+" ("+str(v_group)+")"
384
390
  v_labels.append(v_label)
385
391
  else:
386
392
  for v in vertices:
@@ -391,10 +397,14 @@ class Plotly:
391
397
  v_groupList = vertexColor
392
398
  if len(v_labels) < 1:
393
399
  v_labels = ""
400
+ if showVertexLabels == True:
401
+ mode = "markers+text"
402
+ else:
403
+ mode = "markers"
394
404
  v_trace=go.Scatter3d(x=Xn,
395
405
  y=Yn,
396
406
  z=Zn,
397
- mode='markers',
407
+ mode=mode,
398
408
  name='Graph Vertices',
399
409
  legendgroup=4,
400
410
  legendrank=4,
@@ -457,10 +467,14 @@ class Plotly:
457
467
  if len(e_labels) < 1:
458
468
  e_labels = ""
459
469
 
470
+ if showEdgeLabels == True:
471
+ mode = "lines+text"
472
+ else:
473
+ mode = "lines"
460
474
  e_trace=go.Scatter3d(x=Xe,
461
475
  y=Ye,
462
476
  z=Ze,
463
- mode='lines',
477
+ mode=mode,
464
478
  name='Graph Edges',
465
479
  legendgroup=5,
466
480
  legendrank=5,
topologicpy/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.7.46'
1
+ __version__ = '0.7.47'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: topologicpy
3
- Version: 0.7.46
3
+ Version: 0.7.47
4
4
  Summary: An Advanced Spatial Modelling and Analysis Software Library for Architecture, Engineering, and Construction.
5
5
  Author-email: Wassim Jabi <wassim.jabi@gmail.com>
6
6
  License: MIT License
@@ -10,13 +10,13 @@ topologicpy/Dictionary.py,sha256=KqJ29YyE23Y3Xc6XmKLSCZXRfBvm-OEOxlMZ4dt-rfM,270
10
10
  topologicpy/Edge.py,sha256=vhYHkobSLGSWV-oe2oJFFDobqFToDyb7s71yQ840AAA,65166
11
11
  topologicpy/EnergyModel.py,sha256=XcCP55VW5WHDIIKcURijmBOZEgNUDEn_V9h5EejkntA,53876
12
12
  topologicpy/Face.py,sha256=pn0LGusTPKLrHEMhY94_Bs3rc4wUpIyEqyW9q-ftdG0,115379
13
- topologicpy/Graph.py,sha256=WSnzXQ2Zy7J6WrzhMAvqChCKUHccwsJ2S6fMPCE9d5k,401706
13
+ topologicpy/Graph.py,sha256=1dtcE342b6d7cTiMbtUWWOud6Vu0vHaf4HP2eG_-iqg,402544
14
14
  topologicpy/Grid.py,sha256=3-sn7CHWGcXk18XCnHjsUttNJTWwmN63g_Insj__p04,18218
15
15
  topologicpy/Helper.py,sha256=i-AfI29NMsZXBaymjilfvxQbuS3wpYbpPw4RWu1YCHs,16358
16
16
  topologicpy/Honeybee.py,sha256=vcBECJlgWVjNNdD9ZmjNik_pA1Y_ZNoOorsQb2CiyGA,21965
17
17
  topologicpy/Matrix.py,sha256=umgR7An919-wGInXJ1wpqnoQ2jCPdyMe2rcWTZ16upk,8079
18
18
  topologicpy/Neo4j.py,sha256=YvtF7RYUMATEZ8iHwFwK_MOxEDyARby2DTI2CCK6-cI,19694
19
- topologicpy/Plotly.py,sha256=Q1jrHXFFNwzA6lMa5V0sH7I5p5KRp5y_WohDnhIlB2E,105354
19
+ topologicpy/Plotly.py,sha256=o0JWE51lViK-UJUpIpf2Yusk_vTX5hfNMyFXFinKSRg,106048
20
20
  topologicpy/Polyskel.py,sha256=EFsuh2EwQJGPLiFUjvtXmAwdX-A4r_DxP5hF7Qd3PaU,19829
21
21
  topologicpy/PyG.py,sha256=0yeECsMz-dqhhZSv52s_xPCO_3BcEXUK7z1YFDN9qoo,106987
22
22
  topologicpy/Shell.py,sha256=aKdWIAqmLKPyi80f2PtH3_1iMfQRW0Eklbqol9cOPWM,87601
@@ -27,9 +27,9 @@ topologicpy/Vector.py,sha256=WQQUbwrg7VKImtxuBUi2i-FRiPT77WlrzLP05gdXKM8,33079
27
27
  topologicpy/Vertex.py,sha256=EQdVYHmW85_pZdHZB3N8pEi0GiadCCkF3z_oqohA7B0,71161
28
28
  topologicpy/Wire.py,sha256=9EJE0Iq3nGz5X7Suy6xxjmuOpfV49By6WH98UAL_7m4,153532
29
29
  topologicpy/__init__.py,sha256=D7ky87CAQMiS2KE6YLvcTLkTgA2PY7rASe6Z23pjp9k,872
30
- topologicpy/version.py,sha256=KS8XMe6gtPTpXK_NuIsgQNydQGzAwZnWmO4_bKiEme0,23
31
- topologicpy-0.7.46.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
32
- topologicpy-0.7.46.dist-info/METADATA,sha256=42EcbfaksmdqQVvLq3CqNLHTn-rvIV0e1jCBXyFQz4A,10918
33
- topologicpy-0.7.46.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
34
- topologicpy-0.7.46.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
35
- topologicpy-0.7.46.dist-info/RECORD,,
30
+ topologicpy/version.py,sha256=dUV7gU4tNxCy2pDr--lKpOV5DarADBM2ESg5M5mYK6w,23
31
+ topologicpy-0.7.47.dist-info/LICENSE,sha256=BRNw73R2WdDBICtwhI3wm3cxsaVqLTAGuRwrTltcfxs,1068
32
+ topologicpy-0.7.47.dist-info/METADATA,sha256=6U-VIKu7gA3coK8iB1LazrQeGV8Wkj-q5Fpf4B9ppM0,10918
33
+ topologicpy-0.7.47.dist-info/WHEEL,sha256=Mdi9PDNwEZptOjTlUcAth7XJDFtKrHYaQMPulZeBCiQ,91
34
+ topologicpy-0.7.47.dist-info/top_level.txt,sha256=J30bDzW92Ob7hw3zA8V34Jlp-vvsfIkGzkr8sqvb4Uw,12
35
+ topologicpy-0.7.47.dist-info/RECORD,,