plot2svg icon indicating copy to clipboard operation
plot2svg copied to clipboard

Should not look for 'XData' when type is 'rectangle' in AxesChildBounds

Open Globulle opened this issue 9 years ago • 2 comments

Using Matlab 2013a, I've got the error

Error using hg.rectangle/get The name 'XData' is not an accessible property for an instance of class 'rectangle'.

Error in plot2svg>AxesChildBounds (line 3363) data = reshape(get(dataObjs(j), axisData{i}), [], 1);

Indeed the rectangle object has no XData property:

get(dataObjs(j))
    Annotation = [ (1 by 1) hg.Annotation array]
    Curvature = [1 1]
    DisplayName = 
    FaceColor = none
    EdgeColor = [1 0 1]
    LineStyle = -
    LineWidth = [0.5]
    Position = [25.7977 19.701 0.2 0.2]

    BeingDeleted = off
    ButtonDownFcn = 
    Children = []
    Clipping = on
    CreateFcn = 
    DeleteFcn = 
    BusyAction = queue
    HandleVisibility = on
    HitTest = on
    Interruptible = on
    Parent = [565.002]
    Selected = off
    SelectionHighlight = on
    Tag = vector_marker
    Type = rectangle
    UIContextMenu = []
    UserData = []
    Visible = off

Globulle avatar Jul 01 '15 10:07 Globulle

The same problem. Matlab2015a

Error using matlab.graphics.primitive.Rectangle/get
There is no XData property on the Rectangle class.

Error in plot2svg>AxesChildBounds (line 3363)
            data = reshape(get(dataObjs(j), axisData{i}), [], 1);

Error in plot2svg>get_projection (line 3166)
[xinfi, yinfi, zinfi] = AxesChildBounds(ax);

Error in plot2svg>axes2svg (line 821)
[projection,edges] = get_projection(ax,id);

Error in plot2svg (line 287)
        group=axes2svg(fid,id,ax(j),group,paperpos);

Error in PlotGrid (line 237)
                plot2svg(fullfile(out, [FileName '.svg']), fig_h, 'png');

nazikus avatar Nov 02 '15 09:11 nazikus

just wanted to let you know about the first release of fig2svg:

https://github.com/kupiqu/fig2svg

please give it a try and if the issue is still there please report

kupiqu avatar Nov 26 '18 15:11 kupiqu