EPS plot change colors

7 views (last 30 days)
Kristoffer
Kristoffer on 22 Sep 2014
I save my MatLab figures in .eps format when I use them in LaTeX. But today I experienced something strange.
I plotted a figure with four subplots (2x2) which include i.a. rectangles in red and blue. In one of the subplot (no 3) there should be one red and three blue rectangles (They show up correctly in MatLab). But when I save as .eps format, LaTeX convert them to three red and one blue rectangles. All the other subplots are correct. I have also tried to open the .eps file in Photoshop (both in CMYK and RGB mode) which also gives three red and a blue rectangles.
I don't know if it's relevant, but in Photoshop, the red rectangles in the mentioned subplot is more pale (almost orange) than in the other subplots.
The code I used for all the rectangles (with 'r' and 'b' for colors):
rectangle('Position',[x, y, dx, dy], 'Curvature', [0,0], 'LineWidth', 1.4, 'Linestyle', '-', 'EdgeColor', 'b')
I cannot figure how this happens, but it seems like it's something with how MatLab export to .eps. In .jpg format the colors are correct (but in too low quality for my report unfortunately)

Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!