Why dashed and dotted lines look different on screen and when I export them to a bitmap file?

I have made a plot which uses dashed and dotted lines. When I view it on-screen in MATLAB, I like the size and spacing of the dashes and dots. However, when I export it to a bitmap file (like TIFF), the size and spacing of the dots and dashes is completely different.

 Accepted Answer

Each renderer has its own idea of how to size and space the dashes and dots of such lines. If you are creating a plot containing just lines, then you are most likely working with the painters renderer on screen, and seeing its version of dashed and dotted lines. However, when you exporte the plot to a bitmap format (such as TIFF), MATLAB automatically chooses the ZBuffer renderer for the export (because painters is only used for vector-format exporting). If you change the renderer of the figure to ZBuffer, then you would most likely see the same dashes on screen as you see in the exported TIFF.

More Answers (0)

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!