Open WeiZhang111 opened 3 years ago
I also come across this problem. And I take a look at the help(plotting)
, there is no attribute newfig
.
The 'plotting' is coded in the document /Utilities,so u can add 'import sys' 'sys.path.insert(0, '../../Utilities/')' u can make it.(Try to make the/Utilities be the source Folders. 那个文件在/Utilities文件夹里,需要把这个文件夹加到项目的资源库中就能找到了
The 'plotting' is coded in the document /Utilities,so u can add 'import sys' 'sys.path.insert(0, '../../Utilities/')' u can make it.(Try to make the/Utilities be the source Folders. 那个文件在/Utilities文件夹里,需要把这个文件夹加到项目 这个是指我把源项那个地址改你所说那个代码改成我们目前电脑里面的位置吗,这样他就能自己调用plotting了吗,我改了之后还是有一些问题呀
ValueError: Key pgf.preamble: Could not convert ['\usepackage[utf8x]{inputenc}', '\usepackage[T1]{fontenc}'] to str出现了这个问题
@wanghongyue-echo Did you solve the problem? 你解决这个问题了吗
ValueError: Key pgf.preamble: Could not convert ['\usepackage[utf8x]{inputenc}', '\usepackage[T1]{fontenc}'] to str出现了这个问题
@zhengshichao1991 请问你解决这个问题了吗?
@zhengshichao1991 @wanghongyue-echo I have already solve this problem with the help of Chat GPT.我已经成功解决这个问题了,只需要在Utilities的plotting文件中将 "pgf.preamble": [ r"\usepackage[utf8x]{inputenc}", # use utf8 fonts becasue your computer can handle it :) r"\usepackage[T1]{fontenc}", # plots will be generated using this preamble ] 更改为 "pgf.preamble": "\usepackage[utf8x]{inputenc}\n\usepackage[T1]{fontenc}",
@zhengshichao1991 @wanghongyue-echo I have already solve this problem with the help of Chat GPT.我已经成功解决这个问题了,只需要在Utilities的plotting文件中将 "pgf.preamble": [ r"\usepackage[utf8x]{inputenc}", # use utf8 fonts becasue your computer can handle it :) r"\usepackage[T1]{fontenc}", # plots will be generated using this preamble ] 更改为 "pgf.preamble": "\usepackage[utf8x]{inputenc}\n\usepackage[T1]{fontenc}",
In matplotlib 3.x, you can replace these as
"pgf.preamble": "\n".join([
r"\usepackage[utf8x]{inputenc}", # use utf8 fonts becasue your computer can handle it :)
r"\usepackage[T1]{fontenc}", # plots will be generated using this preamble
])
...