python - python:graphviz不显示更大或更小的标记
问题描述
下图中的这个问题。在 Windows 10 操作系统中。和 jupyter 笔记本。和版本 python 3.8。使用 graphviz 创建图像。
在红色标记的地方。它应该显示一个更大的迹象。在 jupyter notebook 中编写 python 代码。
import sklearn.datasets as datasets
import pandas as pd
import numpy as np
from sklearn.tree import DecisionTreeClassifier
from sklearn.model_selection import train_test_split
from sklearn.externals.six import StringIO
from IPython.display import Image
from sklearn.tree import export_graphviz
import pydotplus
dtree=DecisionTreeClassifier(max_depth=2)
dtree.fit(X_train,y_train)
dot_data = StringIO()
export_graphviz(dtree, out_file=dot_data, filled=True, rounded=True,
special_characters=True, feature_names=X_train.columns)
graph = pydotplus.graph_from_dot_data(dot_data.getvalue())
Image(graph.create_png())
请帮我。
解决方案
您没有显示您的 python 代码,但这直接在点中起作用:
digraph "le" {
le [label="look ≤ here"]
}
推荐阅读
- c++ - 如何在我的类中包含模板参数?
- mysql - 如何将查询结果插入 laravel 中的模型?
- r - 如何在不重塑的情况下构建汇总表
- functional-programming - 如何根据 Clojure 中的模式遍历复杂的地图并删除键?
- mysql - 如何使用 GENERATED 和 SELECT LEFT MYSQL 生成表格内容?
- outlook-addin - 如何在 Outlook 任务窗格中添加约会项目的事件侦听器?
- matplotlib - 删除另一个子图后调整一个子图的大小
- javascript - 使用地图功能的多项选择题
- javascript - Vue 中的 Chartjs 集成解析后的 Json 数据
- wpf - 在 WPF 中的 Ctrl+LeftMouse 上展开/折叠 TreeView 节点