Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6352855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:18:14+00:00 2026-05-24T22:18:14+00:00

quick question: I’m creating random polygons using either the patch() or the fill() function

  • 0

quick question: I’m creating “random” polygons using either the patch() or the fill() function in Matlab. This works quite good and it is plotted correctly.

However, I need to at least save a few hundres polygons as images to my hard drive for working with them later – so I’m looking for a way to directly save the image in my function rather than saving each polygon myself using the file-menu.

Is there any way to do this?

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T22:18:15+00:00Added an answer on May 24, 2026 at 10:18 pm

    You can indeed use the print function, but I would not use the jpeg device. JPEG is never the right format for plots (you will get a lot of artifacts near all your lines).

    If you need a bitmap image, try the png or tiff device. If you don’t need a bitmap, use the appropriate vector image format: fig is the native MATLAB format (which allows you to edit the plot afterwards), so this is the best one if you stick with MATLAB for all your operations. For exporting to other software, I would recommend pdf (works almost anywhere), epsc (EPS with color, great for LaTeX or inkscape), wmf/emf (Windows Metafile, so Windows only, but great for including the images in MS Office). Or you could of course use any of the other formats mentioned in the print documentation.

    Sometimes it’s a pain in the neck to get the format of your image all right (especially with PDF output). Just take a look at the different properties of your figure and more specifically the PaperSize, PaperUnits and PaperPosition.

    The easiest way, and I guess the best solution, is to save as a .fig file. You can do this by using saveas:

    h = figure;
    % your plot commands here
    saveas(h,'mFile.fig');
    

    Afterwards, you can reload the image with the openfig function:

    openfig('mFile.fig');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

quick question really: I have this code: using System; using System.Collections.Generic; using System.Linq; using
quick question, I have a <hr> and this script: <script type=text/javascript > $(function ()
Quick question here about short-circuiting statements in C#. With an if statement like this:
quick question. I am trying to use either javascript, jquery, or php to make
Quick question about general MVC design principle in PHP, using CodeIgniter or Kohana (I'm
Quick question. Does anyone know how to get the function pointer of an objective
Quick question here, I'm using Visual Studio to create an Outlook add-in. I've created
Quick question: I'm using Dozer to make mappings between two different classes. In my
quick question Can you use the free() function without having to prior call a
Quick question about the Dijit.Form.DateTextBox http://docs.dojocampus.org/dijit/form/DateTextBox This page contains the following: also validates against

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.