AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 627383
Accepted
Anders
Anders
Asked: 2015-05-24 07:42:58 +0800 CST2015-05-24 07:42:58 +0800 CST 2015-05-24 07:42:58 +0800 CST

GNU Octave 的图例功能被破坏

  • 772

我在使用 Ubuntu 14.04 LTS 附带的默认 GNU Octave (3.8.1) 生成高质量图时遇到了很大的麻烦。我正在尝试重新运行一些现有代码(数千行代码)并且代码已损坏,因为到处都有带有图例的中间图。我知道代码库是合法的 GNU Octave 代码。

这是一个最小的崩溃示例:

graphics_toolkit('gnuplot') # I need this for TeX-like labels,
                            # but I doubt this cause a trouble with legend
R = 2000; 
N = R/4;
t = (0:N-1)/R;
figure # plot without legend which works fine
plot(t*1000, sin(2*pi*100*t), 'b')
xlabel('t ms')
ylabel('p_e Pa')
figure # plot with legend which crash
plot(t*1000, sin(2*pi*100*t), 'b; sine wave;')
xlabel('t ms')
ylabel('p_e Pa')

这是 GNU Octave 中的输出:

>> error: invalid value = northeast
>> error: set: invalid value for radio property "location" (value = northeast)
>> error: called from:
>> error:   /usr/share/octave/3.8.1/m/plot/appearance/legend.m at line 995, column 11
>> error:   /usr/share/octave/3.8.1/m/plot/draw/private/__plt__.m at line 149, column 7
>> error:   /usr/share/octave/3.8.1/m/plot/draw/plot.m at line 220, column 10
octave
  • 2 2 个回答
  • 2348 Views

2 个回答

  • Voted
  1. Anders
    2015-05-24T09:12:47+08:002015-05-24T09:12:47+08:00

    Steeldriver,你拯救了我的周末。非常感谢!我遇到了与中的错误相同的问题

    http://savannah.gnu.org/bugs/?41390
    

    移除包裹就足够了

    sudo apt remove octave-strings
    

    来自 Ubuntu 软件包存储库。似乎默认的 GNU Octave 包与默认存储库中的所有 Octave-Forge“附加”包都不兼容。你能通过安装那个包来重现这个错误吗?也许应该在某处报告这种不一致。

    顺便说一句,输出

    apt-cache policy octave-strings 
    

    曾是

    >> octave-strings:
    >> Installé : 1.1.0-1build1
    >> Candidat : 1.1.0-1build1 
    >> Table de version :
    >> *** 1.1.0-1build1 0
    >>     500 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
    >>     100 /var/lib/dpkg/status
    

    和输出

    apt-cache policy octave
    

    是

    >> octave:
    >> Installé : 3.8.1-1ubuntu1
    >> Candidat : 3.8.1-1ubuntu1
    >> Table de version :
    >> *** 3.8.1-1ubuntu1 0
    >>    500 http://fr.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
    >>    100 /var/lib/dpkg/status
    
    • 0
  2. Best Answer
    Peter
    2015-05-28T04:34:49+08:002015-05-28T04:34:49+08:00

    我有同样的问题,当删除八度弦时导致其他错误。因此,我使用了“try”语句,如下所示:

    try
      legend(["str1 "; "str2"; "str3"; "str4"; "str5"], 
              "location", "northeast",
              "orientation", "vertical");
    catch
    end_try_catch
    

    这似乎可以解决问题。

    • 0

相关问题

  • 八度上的多图

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve