我可以在没有 onmousemove 的情况下创建 svg 吗?

can I create svg without onmousemove?

我使用 gnuplot(来自 Maxima cas)创建 svg 文件:

Maxima version: "5.40.0"
Maxima build date: "2017-06-19 18:56:04"
Host type: "x86_64-pc-linux-gnu"
Lisp implementation type: "GNU Common Lisp (GCL)"
Lisp implementation version: "GCL 2.6.12"

和:

G N U P L O T
Version 5.0 patchlevel 7    last modified 2017-08-16

示例文件和 Maxima CAS 代码 is here

此类 svg 文件包含多行:

<g onmousemove="gnuplot_svg.showHypertext(evt,'')" 
onmouseout="gnuplot_svg.hideHypertext()"><title> </title>
<use xlink:href='#gpPt6' transform='translate(686.6,831.4) 
scale(0.45)' color='rgb(190, 190, 190)'/></g
<use xlink:href='#gpPt6' transform='translate(686.6,831.3) 
scale(0.45)' color='rgb(190, 190, 190)'/
<use xlink:href='#gpPt6' transform='translate(686.6,831.3) 
scale(0.45)' color='rgb(190, 190, 190)'/    <use xlink:href='#gpPt6' 
transform='translate(686.6,831.3) scale(0.45)' color='rgb(190, 190, 
190)'/

我不想拥有它因为:

此文件很大 (5 GB),因此手动删除所有此类 svg 组很困难(耗时)

我用谷歌搜索了解决方案,但没有找到。

问题:

  1. 我可以在没有这些命令的情况下创建 svg 文件吗?
  2. 如何轻松删除所有此类组?

TIA


编辑:

鼠标事件处理问题是由于 Gnuplot 5.0.0 到 5.3 中的一个错误,已由提交 083bae1 修复到 gnuplot-gnuplot-main。您可以通过以下方式获取当前版本:

git clone git://git.code.sf.net/p/gnuplot/gnuplot-main gnuplot-gnuplot-main
./prepare
./configure
make && make install

在 Ubuntu 14.04 对我有用。

我已经询问了解决方法;如果我发现了什么,我会更新这个答案。参见:https://sourceforge.net/p/gnuplot/mailman/message/36243715/

编辑:解决方法是在 Gnuplot 命令中发出 notitle 而不是 t ''。我修改了draw包中的相关代码。请参阅对 maxima 的提交 d535d11 和 d2488b2。

您可以获得当前版本(https://sourceforge.net/p/maxima/code/ci/master/tree/share/draw/gnuplot.lisp)或者只复制一个修改过的函数:

(defun make-obj-title (str)
  (if (= (length str) 0)
    "notitle"
    (if (> (length str) 80)
      (concatenate 'string "t '" (subseq str 0 75) " ...'")
      (concatenate 'string "t '" str "'"))))