logicparse在schemdraw上使用时没有输入/输出标签。

huangapple go评论76阅读模式
英文:

No input/output labels when using logicparse on schemdraw

问题

我正在尝试使用Collin Delker的Schemdraw Python库生成一些逻辑电路。在使用logicparse生成电路时,输入/输出的标签没有显示在最终图像中。我有以下代码:

from schemdraw.parsing import logicparse
circuit = logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$')
circuit.draw()

这段代码生成了正确的电路,但没有任何标签(请查看下面的图像链接)。此时我不确定这是否是我的实现问题。

逻辑电路图像

  • 我在Google Colab上尝试了这段代码,结果相同。
  • 我还尝试使用schemdraw.use('svg')来更改格式,但也没有成功。

我的机器配置如下:

  • macOS Monterey 12.6.5
  • Python 3.11.1
  • schemdraw==0.16
  • pyparsing==3.0.9

感谢您的支持。

英文:

I'm trying to generate some logic circuits using Collin Delker's Schemdraw Python library. When using logicparse to generate a scheme the labels for the inputs/outputs are not showing in the final image. The code I have is as follows:

from schemdraw.parsing import logicparse
circuit = logicparse('not ((w and x) or (y and z))', outlabel='$\overline{Q}$')
circuit.draw()

This code generates the correct scheme but no labels whatsoever (view image below). At this point I'm not sure if this is an issue with my implementation.

Logic Circuit Image

  • I tried this code on Google Colab with the same results.
  • I also tried changing the format using schemdraw.use('svg') no luck either.

The configuration of my machine is as follows:

  • macOS Monterey 12.6.5
  • Python 3.11.1
  • schemdraw==0.16
  • pyparsing==3.0.9

Thanks for your support.

答案1

得分: 0

这个问题在版本 0.17 中由作者(cdelker)修复。

英文:

This issue was fixed on version 0.17 by the author (cdelker).

huangapple
  • 本文由 发表于 2023年5月30日 05:04:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76360309.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定