Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I am trying to produce a region plot of many functions, but Mathematica keeps showing me the little triangles when I save it as pdf. I have seen other solutions which fix the problem with PlotStyle-> color, but the problem here is the opacity of each plot.

An example:

RegionPlot[{Cos[x^2 y] > 0, Sinc[x y + x y^2] <= 0.3}, {x, -1, 1}, {y, -1, 10}]

will produce this plot:

I had to take a screen shot of the pdf, because I could not upload the pdf here

I saw on the internet suggestions such as:

g2 = p2 /. {Polygon[__] -> {}}

Or some functions that include

PlotPoints -> 100

But that does not work when you have two functions superposed over each other. Of course, you might suggest that I use Show then two region plots, but I don't want to deal with the opacity of each plot, and would rather have Mathematica do that for me.

Any suggestions?

share|improve this question

marked as duplicate by Jens, ciao, Simon Woods, m_goldberg, Yves Klett Apr 20 '14 at 7:22

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

See the answers at… – Steve D Apr 20 '14 at 4:37
If you don't want to convert to a rasterized format, then the solution to Avoiding grid lines inside filled area in RegionPlot exported as PDF appears to work fine here. That's why I would consider this a duplicate of the question linked here or in the above comment by @Steve D. – Jens Apr 20 '14 at 5:21
Image[RegionPlot[{Cos[x^2 y] > 0, Sinc[x y + x y^2] <= 0.3}, {x, -1, 1}, {y, -1, 10}]]

Then you can deal with a image object instead of a graphics object

share|improve this answer
I intend to use this for a publication, and in the case, when you zoom in, the image is not smooth enough. This won't work, sorry. Thanks for the suggestion though – Lina Apr 20 '14 at 3:40
@Lina Then there is another method. RegionPlot[{Cos[x^2 y] > 0, Sinc[x y + x y^2] <= 0.3}, {x, -1, 1}, {y, -1, 10}] // FullForm You can see the structure of the Graphics Object. Delete all List with 3 or 4 elements (the triangles and quadrangles), and leave the long List (the curve), then run it. – Jason Apr 20 '14 at 4:05
I am not sure I understand how to do that... – Lina Apr 21 '14 at 18:11

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