1
$\begingroup$

It seems that ListLinePlot is not generating VECTORIZE PDF file when using Export command.

  1. I use the command : Export["File1.pdf",File1]
  2. I also Right-Click then "Save Graphic As..." File2.pdf

The two files (grouped) are added for clarity. There are differences in the following :

  • File size
  • Image quality : points gets blurred at high resolution
  • Gray Rectangle corner points are deformed
  • Orange Polygon is moving out of the frame in file obtained via (1) approach.

Any solution to this will be helpful.

The complete code is :

test = ListLinePlot[iData,
  Mesh -> All, MeshStyle -> Directive[PointSize[0.006]],
  PlotRange -> {{1, 14}, {0, 2.8}},
  FrameLabel -> {"R (km)", 
    "M (\!\(\*SubscriptBox[\(M\), \(\[CircleDot]\)]\))"},
  Epilog -> {
    {Black, PointSize[Large], Point[{10.97, 1.97}]},
    {Black, Dashed, 
     Line[{{10.97, 1.97}, {10.97, 1.97}, {0, 1.97}, {10.97, 1.97}}]},
    Text[Rotate[Style["Causality", 15, Black], 48 Degree], {6, 2.3}],
    Text[Rotate[Style["P > \[Infinity]", 15, Black], 
      56 Degree], {4.85, 2.3}],
    Text[Rotate[Style["GR Limit", 15, Black], 0 Degree], {2.6, 2.3}]},
  Prolog -> {Text[Style["PSRJ1614-2230", 16, Black], {10.2, 2.3}],
    {EdgeForm[Thin], RGBColor[1.00, 0.90, 0.80], 
     Polygon[{{0, 0}, {10.97, 10.97/2.9}, {0, 10.97/2.9}}]},
    {EdgeForm[Thin], RGBColor[1.00, 0.78, 0.55], 
     Polygon[{{0, 0}, {10.97, 4*10.97/9.0}, {0, 4*10.97/9.0}}]},
    {EdgeForm[Thin], RGBColor[1.00, 0.67, 0.33], 
     Polygon[{{0, 0}, {10.97, 10.97/2.0}, {0, 10.97/2.0}}]},
    {EdgeForm[{Thick, GrayLevel[0.6]}], 
     HatchFilling[45 Degree, 0.5, 3], GrayLevel[0.8], 
     Rectangle[{8.3, 1.97 - 0.04}, {12, 1.97 + 0.04}]}}]

Dataset is available @ Here

Thanks & Regards,

enter image description here

$\endgroup$
3
  • $\begingroup$ What is your question? Please be clear and to the point. $\endgroup$
    – Szabolcs
    Jun 13, 2022 at 6:29
  • $\begingroup$ Where are files? $\endgroup$
    – Rom38
    Jun 13, 2022 at 6:29
  • $\begingroup$ Updated, Any idea about getting VECTOR output from the ListLinePlot ??? $\endgroup$ Jun 13, 2022 at 7:55

1 Answer 1

6
$\begingroup$

HatchFilling* is implemented as a pixel shader. If pixel shaders are involved, the output will always be a raster. There might be other reasons, but that is the one that jumped out while reading your code.

* This applies to all of the Filling and Shading directives, VertexColors, and Texture.

$\endgroup$
4
  • $\begingroup$ Thanks, @ihojnicki : Any other way I can implement vector shading inside some graphic objects ? $\endgroup$ Jun 13, 2022 at 14:51
  • $\begingroup$ @KumarGauravSagar There are some non-HatchFilling solutions here and here $\endgroup$
    – Michael E2
    Jun 13, 2022 at 15:15
  • $\begingroup$ @KumarGauravSagar Also note that the gradient legend shown in the images probably uses a pixel shader, too. $\endgroup$
    – Michael E2
    Jun 13, 2022 at 15:17
  • $\begingroup$ Thanks Michael E2 for the links...but these solution are too bulky. The problem, I finally checked after @ihojnicki answer and I traced it down to the implementation of HatchFilling only. $\endgroup$ Jun 14, 2022 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.