0
$\begingroup$

I am creating graphics with the following code

pts={{-0.680422, 0.0957483}, {-1.07217, 0.283248}, {-0.0721688, 
0.283248}, {0.536084, 0.470748}, {0.927831, 0.283248}, {-0.463916, 
0.470748}, {0.319578, 0.0957483}, {-0.680422, 1.72874}, {-1.07217, 
1.91624}, {-0.0721688, 1.91624}, {0.536084, 2.10374}, {0.927831, 
1.91624}, {-0.463916, 2.10374}, {0.319578, 1.72874}};
fig=Graphics[{GraphicsComplex[pts,Line[{{6, 4, 5, 7, 1, 2, 6}, {13, 11, 12, 14, 8, 9, 13}, {3, 6}, {3, 4}, {3, 5}, {3, 7}, {3, 1}, {3, 
  2}, {3, 6}, {10, 13}, {10, 11}, {10, 12}, {10, 14}, {10, 
  8}, {10, 9}, {10, 13}, {6, 13}, {4, 11}, {5, 12}, {7, 14}, {1, 
  8}, {2, 9}, {6, 13}}]]}];

The figure is exported into different formats using

Export["fig.jpeg", fig, ImageResolution -> 600]
Export["fig.png", fig, ImageResolution -> 600]
Export["fig.pdf", fig, ImageResolution -> 600]

The files exported are of 224kB, 106kB and 2kB respectively. Of all these, pdf file has the lowest size and highest resolutions and very sharp image even at 2400%. But the image in pdf file looks like

image from pdf file having missing feature

The missing feature in the pdf file is the horizontal line connecting the extreme vertices on both the faces.

I tried using Rasterize option while exporting. This is increasing the file size and restricting the image resolution.

Is there any other optimized solution for this.

Thank you.

$\endgroup$
  • $\begingroup$ I do not see this problem in version 11.3.0. EDIT: In fact I do not even see it in version 11.0.1 on macOS. Try fully restarting Mathematica and dropping the ImageResolution option. If the problem persists, it may be a platform-specific bug. Please mention your OS. $\endgroup$ – Szabolcs Feb 14 at 11:03
  • $\begingroup$ I am using windows 10. Restarting Mathematica and dropping image resolution in "export" options also could not help! $\endgroup$ – rajendra Feb 14 at 13:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.