Undesirable grid appears when ParametricPlot is exported as PDF

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
5
down vote

favorite












Writing:



plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
PlotRange -> 0, 2, -1, 2]


I get:



enter image description here



but if I write:



Export["test.pdf", plot]


I get:



enter image description here



How can I get the same image in test.pdf?







share|improve this question


















  • 1




    How about this? plot = Plot[1, x, 0, 2, PlotRange -> 0, 2, -1, 2, Frame -> True, Filling -> Axis, AspectRatio -> 1.5,PlotStyle -> Thin]
    – Okkes Dulgerci
    Aug 13 at 13:43










  • Thanks, the result is the desired one, but I should use the parametric method. :(
    – TeM
    Aug 13 at 14:31










  • You can try Will Robertson's FixPolygons package for joining the polygons.
    – Alexey Popkov
    Aug 13 at 14:40










  • Does this help? Avoiding white lines inside filled area in RegionPlot exported as PDF or PS
    – Jens
    Aug 13 at 14:53






  • 1




    What's up with Min[1, 2] t? Surely that can be replaced by t alone? Or doesn't the problem reproduce then?
    – Andreas Rejbrand
    Aug 13 at 16:46














up vote
5
down vote

favorite












Writing:



plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
PlotRange -> 0, 2, -1, 2]


I get:



enter image description here



but if I write:



Export["test.pdf", plot]


I get:



enter image description here



How can I get the same image in test.pdf?







share|improve this question


















  • 1




    How about this? plot = Plot[1, x, 0, 2, PlotRange -> 0, 2, -1, 2, Frame -> True, Filling -> Axis, AspectRatio -> 1.5,PlotStyle -> Thin]
    – Okkes Dulgerci
    Aug 13 at 13:43










  • Thanks, the result is the desired one, but I should use the parametric method. :(
    – TeM
    Aug 13 at 14:31










  • You can try Will Robertson's FixPolygons package for joining the polygons.
    – Alexey Popkov
    Aug 13 at 14:40










  • Does this help? Avoiding white lines inside filled area in RegionPlot exported as PDF or PS
    – Jens
    Aug 13 at 14:53






  • 1




    What's up with Min[1, 2] t? Surely that can be replaced by t alone? Or doesn't the problem reproduce then?
    – Andreas Rejbrand
    Aug 13 at 16:46












up vote
5
down vote

favorite









up vote
5
down vote

favorite











Writing:



plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
PlotRange -> 0, 2, -1, 2]


I get:



enter image description here



but if I write:



Export["test.pdf", plot]


I get:



enter image description here



How can I get the same image in test.pdf?







share|improve this question














Writing:



plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
PlotRange -> 0, 2, -1, 2]


I get:



enter image description here



but if I write:



Export["test.pdf", plot]


I get:



enter image description here



How can I get the same image in test.pdf?









share|improve this question













share|improve this question




share|improve this question








edited Aug 13 at 15:25









Alexey Popkov

37.5k4102254




37.5k4102254










asked Aug 13 at 12:46









TeM

1,643618




1,643618







  • 1




    How about this? plot = Plot[1, x, 0, 2, PlotRange -> 0, 2, -1, 2, Frame -> True, Filling -> Axis, AspectRatio -> 1.5,PlotStyle -> Thin]
    – Okkes Dulgerci
    Aug 13 at 13:43










  • Thanks, the result is the desired one, but I should use the parametric method. :(
    – TeM
    Aug 13 at 14:31










  • You can try Will Robertson's FixPolygons package for joining the polygons.
    – Alexey Popkov
    Aug 13 at 14:40










  • Does this help? Avoiding white lines inside filled area in RegionPlot exported as PDF or PS
    – Jens
    Aug 13 at 14:53






  • 1




    What's up with Min[1, 2] t? Surely that can be replaced by t alone? Or doesn't the problem reproduce then?
    – Andreas Rejbrand
    Aug 13 at 16:46












  • 1




    How about this? plot = Plot[1, x, 0, 2, PlotRange -> 0, 2, -1, 2, Frame -> True, Filling -> Axis, AspectRatio -> 1.5,PlotStyle -> Thin]
    – Okkes Dulgerci
    Aug 13 at 13:43










  • Thanks, the result is the desired one, but I should use the parametric method. :(
    – TeM
    Aug 13 at 14:31










  • You can try Will Robertson's FixPolygons package for joining the polygons.
    – Alexey Popkov
    Aug 13 at 14:40










  • Does this help? Avoiding white lines inside filled area in RegionPlot exported as PDF or PS
    – Jens
    Aug 13 at 14:53






  • 1




    What's up with Min[1, 2] t? Surely that can be replaced by t alone? Or doesn't the problem reproduce then?
    – Andreas Rejbrand
    Aug 13 at 16:46







1




1




How about this? plot = Plot[1, x, 0, 2, PlotRange -> 0, 2, -1, 2, Frame -> True, Filling -> Axis, AspectRatio -> 1.5,PlotStyle -> Thin]
– Okkes Dulgerci
Aug 13 at 13:43




How about this? plot = Plot[1, x, 0, 2, PlotRange -> 0, 2, -1, 2, Frame -> True, Filling -> Axis, AspectRatio -> 1.5,PlotStyle -> Thin]
– Okkes Dulgerci
Aug 13 at 13:43












Thanks, the result is the desired one, but I should use the parametric method. :(
– TeM
Aug 13 at 14:31




Thanks, the result is the desired one, but I should use the parametric method. :(
– TeM
Aug 13 at 14:31












You can try Will Robertson's FixPolygons package for joining the polygons.
– Alexey Popkov
Aug 13 at 14:40




You can try Will Robertson's FixPolygons package for joining the polygons.
– Alexey Popkov
Aug 13 at 14:40












Does this help? Avoiding white lines inside filled area in RegionPlot exported as PDF or PS
– Jens
Aug 13 at 14:53




Does this help? Avoiding white lines inside filled area in RegionPlot exported as PDF or PS
– Jens
Aug 13 at 14:53




1




1




What's up with Min[1, 2] t? Surely that can be replaced by t alone? Or doesn't the problem reproduce then?
– Andreas Rejbrand
Aug 13 at 16:46




What's up with Min[1, 2] t? Surely that can be replaced by t alone? Or doesn't the problem reproduce then?
– Andreas Rejbrand
Aug 13 at 16:46










2 Answers
2






active

oldest

votes

















up vote
6
down vote



accepted










UPDATE: See more general solution in this answer.




You can solve this problem by joining the polygons using undocumented function Graphics`PolygonUtils`PolygonCombine:



plot = Normal@
ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1,
PlotRange -> 0, 2, -1, 2] /.
p : __Polygon :> Graphics`PolygonUtils`PolygonCombine[p];

Export["test.pdf", plot] // SystemOpen


Here is how the file is rendered by Adobe Acrobat:



screenshot



(checked with version 11.1.0).






share|improve this answer






















  • Perfect! Thanks!
    – TeM
    Aug 13 at 17:34

















up vote
2
down vote













Another workaround is to remove transparency from the polygons by specifying the PlotStyle explicitly:



plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
PlotRange -> 0, 2, -1, 2, Mesh -> None,
PlotStyle -> RGBColor[0.812, 0.851, 0.914, 1]]



output




Now the PDF



Export["test.pdf", %] // SystemOpen


is rendered as



screenshot






share|improve this answer




















    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "387"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f179951%2fundesirable-grid-appears-when-parametricplot-is-exported-as-pdf%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    6
    down vote



    accepted










    UPDATE: See more general solution in this answer.




    You can solve this problem by joining the polygons using undocumented function Graphics`PolygonUtils`PolygonCombine:



    plot = Normal@
    ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1,
    PlotRange -> 0, 2, -1, 2] /.
    p : __Polygon :> Graphics`PolygonUtils`PolygonCombine[p];

    Export["test.pdf", plot] // SystemOpen


    Here is how the file is rendered by Adobe Acrobat:



    screenshot



    (checked with version 11.1.0).






    share|improve this answer






















    • Perfect! Thanks!
      – TeM
      Aug 13 at 17:34














    up vote
    6
    down vote



    accepted










    UPDATE: See more general solution in this answer.




    You can solve this problem by joining the polygons using undocumented function Graphics`PolygonUtils`PolygonCombine:



    plot = Normal@
    ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1,
    PlotRange -> 0, 2, -1, 2] /.
    p : __Polygon :> Graphics`PolygonUtils`PolygonCombine[p];

    Export["test.pdf", plot] // SystemOpen


    Here is how the file is rendered by Adobe Acrobat:



    screenshot



    (checked with version 11.1.0).






    share|improve this answer






















    • Perfect! Thanks!
      – TeM
      Aug 13 at 17:34












    up vote
    6
    down vote



    accepted







    up vote
    6
    down vote



    accepted






    UPDATE: See more general solution in this answer.




    You can solve this problem by joining the polygons using undocumented function Graphics`PolygonUtils`PolygonCombine:



    plot = Normal@
    ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1,
    PlotRange -> 0, 2, -1, 2] /.
    p : __Polygon :> Graphics`PolygonUtils`PolygonCombine[p];

    Export["test.pdf", plot] // SystemOpen


    Here is how the file is rendered by Adobe Acrobat:



    screenshot



    (checked with version 11.1.0).






    share|improve this answer














    UPDATE: See more general solution in this answer.




    You can solve this problem by joining the polygons using undocumented function Graphics`PolygonUtils`PolygonCombine:



    plot = Normal@
    ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1,
    PlotRange -> 0, 2, -1, 2] /.
    p : __Polygon :> Graphics`PolygonUtils`PolygonCombine[p];

    Export["test.pdf", plot] // SystemOpen


    Here is how the file is rendered by Adobe Acrobat:



    screenshot



    (checked with version 11.1.0).







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Aug 14 at 8:45

























    answered Aug 13 at 15:13









    Alexey Popkov

    37.5k4102254




    37.5k4102254











    • Perfect! Thanks!
      – TeM
      Aug 13 at 17:34
















    • Perfect! Thanks!
      – TeM
      Aug 13 at 17:34















    Perfect! Thanks!
    – TeM
    Aug 13 at 17:34




    Perfect! Thanks!
    – TeM
    Aug 13 at 17:34










    up vote
    2
    down vote













    Another workaround is to remove transparency from the polygons by specifying the PlotStyle explicitly:



    plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
    PlotRange -> 0, 2, -1, 2, Mesh -> None,
    PlotStyle -> RGBColor[0.812, 0.851, 0.914, 1]]



    output




    Now the PDF



    Export["test.pdf", %] // SystemOpen


    is rendered as



    screenshot






    share|improve this answer
























      up vote
      2
      down vote













      Another workaround is to remove transparency from the polygons by specifying the PlotStyle explicitly:



      plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
      PlotRange -> 0, 2, -1, 2, Mesh -> None,
      PlotStyle -> RGBColor[0.812, 0.851, 0.914, 1]]



      output




      Now the PDF



      Export["test.pdf", %] // SystemOpen


      is rendered as



      screenshot






      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote









        Another workaround is to remove transparency from the polygons by specifying the PlotStyle explicitly:



        plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
        PlotRange -> 0, 2, -1, 2, Mesh -> None,
        PlotStyle -> RGBColor[0.812, 0.851, 0.914, 1]]



        output




        Now the PDF



        Export["test.pdf", %] // SystemOpen


        is rendered as



        screenshot






        share|improve this answer












        Another workaround is to remove transparency from the polygons by specifying the PlotStyle explicitly:



        plot = ParametricPlot[x, Min[1, 2] t, x, 0, 2, t, 0, 1, 
        PlotRange -> 0, 2, -1, 2, Mesh -> None,
        PlotStyle -> RGBColor[0.812, 0.851, 0.914, 1]]



        output




        Now the PDF



        Export["test.pdf", %] // SystemOpen


        is rendered as



        screenshot







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 13 at 15:38









        Alexey Popkov

        37.5k4102254




        37.5k4102254



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f179951%2fundesirable-grid-appears-when-parametricplot-is-exported-as-pdf%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What does second last employer means? [closed]

            List of Gilmore Girls characters

            One-line joke