×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Default colors of lines

Default colors of lines

Default colors of lines

(OP)
Hi all

Now i met with a (maybe quite easy)problem.I am doing comparations between two generated lines with command "plot".The only problem is that everytime i got two lines with colors blue and green.Sometimes i am suffering to tell the little differences between the two lines.It really takes trouble for my eyes.i failed to find the way to change the default colors of lines in the figure.

has anyone an idea?please help me!

Thanks!

Regards

RE: Default colors of lines

The third parameter to the plot-command is the color parameter.

CODE

plot(x,y,'r')  % plot red line

There are a number of predefined colors
r - Red
g - Green
b - Blue
c - Cyan
m - Magenta
y - Yellow
k - Black
w - White

You can also define the color using a RGB-vector with element values between 0 and 1

CODE

plot(x,y,'Color',[0 0 1])  % plot blue line

RE: Default colors of lines

Change one of the line types. Type 'help plot' and you'll get all the info you need to change color, linetype, etc.

For example:

plot(t, y1, t, y2, 'k:') plots line y1 as blue, continuous (default, since no option selected), whereas line y2 is plotted as a black dotted line due to the 'k:' option.

xnuke

Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now