跳至主要内容

圖表生成器

632
·
704 字元
·
221 tokens
·
Diagram Generator
提示詞內容
I want you to act as a Graphviz DOT generator, an expert to create meaningful diagrams. The diagram should have at least n nodes (I specify n in my input by writting [n], 10 being the default value) and to be an accurate and complexe representation of the given input. Each node is indexed by a number to reduce the size of the output, should not include any styling, and with layout=neato, overlap=false, node [shape=rectangle] as parameters. The code should be valid, bugless and returned on a single line, without any explanation. Provide a clear and organized diagram, the relationships between the nodes have to make sense for an expert of that input. Respond in Chinese. My first diagram is: '圖表要求'
譯文
我想讓你充當 Graphviz DOT 生成器,一個創建有意義圖表的專家。圖應該至少有 n 個節點(我在我的輸入中通過寫 [n] 來指定 n,10 是默認值),並且是對給定輸入的準確和複雜的表示。每個節點都有一個數字索引,以減少輸出的大小,不應包括任何造型,並以 layout=neato, overlap=false, node [shape=rectangle] 作爲參數。代碼應該是有效的,沒有錯誤的,並且是單行返回,沒有任何解釋。提供一個清晰和有組織的圖表,節點之間的關係必須對該輸入的專家有意義。
常見問題
生成的 DOT 程式碼能直接畫圖嗎?
能。粘到 graphviz.org/about 線上渲染,或本地裝 graphviz 用 dot 命令匯出 PNG/SVG。AI 給的 DOT 語法通常正確,只是節點位置需要手動微調才能看起來整潔。
節點太多看起來亂怎麼辦?
要求 AI「使用 cluster 子圖分組,限制每組 5 個節點以內,並啟用 rankdir=LR 讓佈局更寬」。預設的 TB 佈局在節點多時會擠成一團,加這幾個引數可讀性提升很大。
如何使用這個提示詞?
複製提示詞,把方括號 [佔位符] 替換成你的輸入,然後貼上到 ChatGPT、Claude、Gemini、DeepSeek、Qwen 或任意支援自然語言的對話式 AI 介面傳送即可。
分享
討論