2
$\begingroup$

It's amazing that 12.2's new function PointValuePlot can't generate vector figure when I set ColorFunction->"Rainbow". Then I save the figure as PDF, I am sure it's not an vector figure. Is this due to my computer problem? How to solve it if I want to use ColorFunction->"Rainbow"?


Code:

PointValuePlot[
    RandomReal[{0, 1}, {100, 2}] -> RandomReal[{0, 100}, 100],
    ColorFunction -> "Rainbow",
    FrameTicks -> None,
    FrameStyle -> Thick
]

Very Thanks!


Update

Steps:

  1. Use the aforementioned code, you can get a figure, then generate a palette from this figure, you can use Alt+P+P as shortcut key.

  2. Save this palette as pdf, and observe whether it is an vector figure.

According to my experiment, this problem only occur with ColorFunction.

Example Figures:

  1. No ColorFunction Vector Figure

  2. With ColorFunction Not an Vector Figure

$\endgroup$
2
  • $\begingroup$ Can you give steps to reproduce the problem? Does the same thing happen without the ColorFunction specification? Does it happen with different ColorFunctions? $\endgroup$
    – bill s
    May 9, 2021 at 10:25
  • $\begingroup$ Strongly related: mathematica.stackexchange.com/q/262640/280 $\endgroup$ Jan 26, 2022 at 7:26

1 Answer 1

2
$\begingroup$

Update

I have rechecked the described behavior of Export with versions 12.3.1 and 13.0.0 on Windows 10 x64, and the problem isn't reproduced. It seems they have fixed Export in version 12.3.


Original answer

This is due to VertexColors used in the output. You can see it's internal structure with my shortInputForm function:

pl = PointValuePlot[
   RandomReal[{0, 1}, {100, 2}] -> RandomReal[{0, 100}, 100], 
   ColorFunction -> "Rainbow", FrameTicks -> None, 
   FrameStyle -> Thick];

pl // shortInputForm // Short

output

One can get rid of VertexColors by applying Normal. Then the plot is exported without rasterization:

Export["PointValuePlot.pdf", pl // Normal] // SystemOpen

screenshot

This isn't a bug, but I suggest writing a suggestion for improvement about this issue to the official technical support.

$\endgroup$
1
  • $\begingroup$ Thanks very much, bro. $\endgroup$ May 10, 2021 at 12:59

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.