5
$\begingroup$

I have a data here. I plotted this data by ListDensityPlot and exported to SVG (or PDF) file for editing in Illustrator using the following code.

data = Uncompress[FromCharacterCode[
Flatten[ImageData[Import["http://i.stack.imgur.com/WjthO.png"],"Byte"]]]];
plot = ListDensityPlot[data];
Export["location",plot]

Here is a screenshot from Illustrator enter image description here

Why all these labels became a raster file? How do I keep it as a vector? Am I doing something wrong here? Any suggestions?

$\endgroup$
  • $\begingroup$ @Nasser, I meant to say the same thing happens with both format $\endgroup$ – TM90 Apr 28 '17 at 7:35
  • $\begingroup$ @Nasser, How do you deal with these situations? $\endgroup$ – TM90 Apr 28 '17 at 7:40
  • $\begingroup$ This behavior most probably is OS-dependent. What is your OS? $\endgroup$ – Alexey Popkov Apr 30 '17 at 15:07
  • $\begingroup$ Does this happen only with ticks? Does this happen for ListPlot? Does this happen for exporting text as PDF? $\endgroup$ – Alexey Popkov Apr 30 '17 at 15:08
  • 1
    $\begingroup$ There are things to do after your question is answered. It's a good idea to stay vigilant for some time, better approaches may come later improving over previous replies. Experienced users may point alternatives, caveats or limitations. New users should test answers before voting and wait 24 hours before accepting the best one. Participation is essential for the site, please come back to do your part now. $\endgroup$ – rhermans Jun 5 '17 at 10:53
1
$\begingroup$

Data & Plot

data = ToExpression@Import["https://pastebin.com/raw/kEBf2TUM", "String"];

plot = ListDensityPlot[data];

Export with and without Rasterization

Export["location1.PDF", plot, "AllowRasterization" -> False]
(* "location1.PDF" *)

Mathematica graphics

Export["location2.PDF", plot, "AllowRasterization" -> True]
(* "location2.PDF" *)

Mathematica graphics


Explanation

Result depends on the value of the "AllowRasterization" option, which by default us Automatic.

Mathematica graphics Mathematica graphics

| improve this answer | |
$\endgroup$
  • $\begingroup$ Since we have suffered that third party sites(you know), I always avoid use those data in third party sites.So I have changed the original data.. $\endgroup$ – yode Jun 1 '17 at 18:11
  • $\begingroup$ @yode, no need in this case, pastebin has this post with expiration set to "Never". $\endgroup$ – rhermans Jun 1 '17 at 18:15
0
$\begingroup$

Ran your code in Mathematica 11.1.1 on Windows 10. Exported a PDF as you showed.

Here is what I see in Adobe Acrobat PDF.

Here is what I see in PDF file

Here is what I see in Adobe Illustrator CC 2017.1.0 .

Here is what I see in Adobe Illustrator CC 2017.1.0

Do not see rasterizing problem.

Here is more zooming of lower right of plot.

enter image description here

Here I change the last frame tick label from 2.4 to 3.14 in Adobe Illustrator.

enter image description here

But I am not proficient with Adobe Illustrator.

| improve this answer | |
$\endgroup$
  • $\begingroup$ I am currently using Mathematica 11.0, I will upgrade to 11.1.0 and check since 11.1.1 is not availble $\endgroup$ – TM90 Apr 30 '17 at 3:54
  • $\begingroup$ It does not work in my case. Can you zoom the portion three times the size as of now or Can you please check whether you can edit the label or not in Adobe illsustrator $\endgroup$ – TM90 Apr 30 '17 at 7:28
  • $\begingroup$ I've zoomed the plot in Adobe Illustrator and put the zoomed image at the end of my original post. I'm not very proficient with Illustrator. When you ask whether I can edit "the label", do you mean, for example, can I change the "2.4" label to something else, such as "3.3", within Illustrator? $\endgroup$ – user15996 Apr 30 '17 at 14:54
  • $\begingroup$ I believe I was able to change the last label from 2.4 to 3.14 within Adobe Ilustrator. See repost of my original answer. Does this help? $\endgroup$ – user15996 Apr 30 '17 at 15:02
  • $\begingroup$ I got your point.Could you also tell me the size of the pdf file, please? . How long did it take to export? $\endgroup$ – TM90 Apr 30 '17 at 22:20

Your Answer

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

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