简体   繁体   English

Gremlin - 如何显示字段值而不是 label 值

[英]Gremlin - how to show field value instead label value

with gremlin I want to show a graph with vertex name a field name end not the label name.使用 gremlin 我想显示一个带有顶点名称的图形,一个字段名称结尾不是 label 名称。 How can do it?怎么办?

If I use this my graph如果我用这个我的图表

I see the label name and not a specific value field, for example Name field value How I can modify my query?我看到 label 名称而不是特定值字段,例如 Name 字段值 如何修改我的查询? Thanks a lot非常感谢

I want a specific value field for vertex我想要顶点的特定值字段

That looks like you are using the graph-notebook Jupyter notebooks.看起来您正在使用graph-notebook Jupyter 笔记本。 You can use the -d and -de flags to tell the notebook how to label the diagram.您可以使用-d-de标志告诉笔记本如何 label 图表。 For example:例如:

%%gremlin -d name -de weight

will label nodes using a "name" property, and edges using a "weight" property.将使用“名称”属性的 label 个节点和使用“权重”属性的边。

Note that most of the magic commands, like %%gremlin support asking for help.请注意,大多数魔术命令,如%%gremlin都支持寻求帮助。 You just need to put at least one character in the cell body.您只需要在单元体中放置至少一个字符即可。 For example:例如:

%%gremlin --help
x

There is additional documentation available here and here 此处此处提供了其他文档

There are also a number of sample notebooks that come included with the graph-notebook open source package. Several of those contain examples of how to customize graph visualizations.图形笔记本开源 package 中还包含许多示例笔记本。其中一些示例包含如何自定义图形可视化的示例。 You may find those useful.您可能会发现这些有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM