在Mathematica中使用图形替换十字盘

问题描述

|| 考虑以下列表:
dalist = {{47.9913,11.127,208},{47.5212,10.3002,{49.7695,9.96838,160},{48.625,12.7042,436}}
这些是屏幕上眼睛注视的坐标,在每个子列表中,
#1
是X坐标
#2
Y坐标和
#3
,在该特定位置花费的时间 然后,我使用以下内容
disk[{#[[1]],#[[2]]},3N[#[[3]]/Total[dalist[[All,3]]]]] & /@ dalist
用持续时间加权直径绘制圆盘。 我想画一个十字线,在这两个线段的中间相交,每个线段的长度等于圆盘直径,如下图所示。 这是我还没有的:
Graphics[{
          Line[{{#[[1]] - 3 N[#[[3]]/Total[dalist[[All,3]]]],{#[[1]] + 3 N[#[[3]]/Total[dalist[[All,#[[2]]}}] & /@ dalist,Line[{{#[[1]],#[[2]] - 3 N[#[[3]]/Total[dalist[[All,3]]]]},{#[[1]],#[[2]] + 3 N[#[[3]]/Total[dalist[[All,3]]]]}}] & /@ dalist}]
我想知道是否有一种更简单的方法,使用类似于ListPlot中存在的PlotMarkers的方法     

解决方法

        使用两行。就像是:
pointTrans =
  {
     Line[{{#[[1]] - l,#[[2]]},{#[[1]] + l,#[[2]]}}],Line[{{#[[1]],#[[2]] - l},{#[[1]],#[[2]] + l}}]
     } /. l -> #[[3]]/Mean[dalist[[All,3]]] &;

pointTrans /@ dalist // Graphics // Show
    ,        您已经可以绘制圆了,为什么不这样使用呢?
circles=Graphics[Disk[{#[[1]],3 N[#[[3]]/Total[dalist[[All,3]]]]] & /@ dalist]
接着
circles /. Disk[{x_,y_},r_] :> Line[{{{x,y - r/2},{x,y + r/2}},{{x - r/2,y},{x + r/2,y}}}]
给予     ,        我认为这里有一些辅助功能很方便:
makeCross[{x_,y_,r_},total_] := With[{scale = 3*r/total},Line[{{{x - scale,{x + scale,y}},{{x,y - scale},y + scale}}}]]

total = Total[dalist[[All,3]]];

Graphics[makeCross[#,mean] & /@ dalist]
    ,        您也可以使用
BubbleChart
plus[{x:{x0_,x1_},y:{y0_,y1_}},__] := 
 Line[{{{x0,Mean[y]},{x1,Mean[y]}},{{Mean[x],y0},{Mean[x],y1}}}]

BubbleChart[dalist,ChartElementFunction -> plus] (*or maybe \"MarkerBubble\" instead of plus*)
    ,        我想提供对Artefacto代码的修改。
pointTrans = 
  With[{l = #3/2/Mean@dalist[[All,3]]},Line@{{{# - l,#2},{# + l,#2}},{{#,#2 - l},{#,#2 + l}}}
  ] &;

Graphics[{Thick,pointTrans @@@ dalist}]