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

问题描述 投票:2回答:1

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

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)'/

我不想拥有它,因为:

  • 我没有使用这样的功能
  • 它阻止wiki commons页面上传svg文件。我手动编辑文件以上传它。

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

我用google搜索解决方案,但没有找到。

问题:

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

TIA


编辑:

  • gnuplot命令:“未设置鼠标”不起作用
svg mouseevent gnuplot wikipedia maxima
1个回答
3
投票

鼠标事件处理的原因是由于Gnuplot 5.0.0到5.3中的一个错误,该错误已由commit 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中的相关代码。请参阅提交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 "'"))))
© www.soinside.com 2019 - 2024. All rights reserved.