Mathematica Asked by ChuanNan Li on May 26, 2021
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!
Steps:
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.
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:
This is die 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
One can get rid of VertexColors
by applying Normal
. Then the plot is exported without rasterization:
Export["PointValuePlot.pdf", pl // Normal] // SystemOpen
This isn't a bug, but I suggest writing a suggestion for improvement about this issue to the official technical support.
Answered by Alexey Popkov on May 26, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP