Get the App
SLTechnology News&Howtos  ›  Development  › 

How to draw cool coordinate area with Matlab

Shulou Source: shulou.com Published: 2022-05-31 16:37:24 11月13日 Update

This article mainly introduces the relevant knowledge of "how to draw cool coordinate areas in Matlab". The editor shows you the operation process through actual cases. The method of operation is simple and fast, and it is practical. I hope this article "how to draw cool coordinate areas in Matlab" can help you solve the problem.

Mode of use

First of all, explain how to use the function: suppose you write the following function:

Marker','d','LineWidth',2,'Color', (t), 'Marker','d','LineWidth',2,'Color', [102194166]. / 255) hold onplot (tcos (t),' LineWidth',2,'Color', [140161204]. / 255)

Call the tool function on the last line to decorate, for example:

PrettyAxes () .ggray2 ()

Or:

PrettyAxes (gca) .ggray2 ()

Retouching effect:

Other cool backgrounds

PrettyAxes () .dark ()

PrettyAxes () .dark2 ()

PrettyAxes () .economist ()

PrettyAxes () .gbase ()

PrettyAxes () .gbase2 ()

PrettyAxes () .ggray ()

PrettyAxes () .ggray2 ()

PrettyAxes () .wsj ()

There are currently only these topics, and the .mat file may be updated later, use the following command to get a list of available topics:

PrettyAxes () .theme ()

This command returns the function name of the available theme:

Dark dark2 economist gbase gbase2 ggray ggray2 wsj

Matters needing attention

For these styles of dark,dark2,economist,wsj, the background color is not white. In general, the background of the saved image window will be white by default, as shown below:

To save the background color of the figure window, you need to set the InvertHardcopy property of the figure window to 'off',. This function has already set this property, so simply click the following button to save:

In addition, when the file is decompressed, add the current folder to the search path and use this tool function in any folder:

Code display and mat file acquisition

The complete code is actually nothing, but let's show it. Most of the information is stored in the .mat file. The complete code and the .mat file please reply the key word: PAX in the official account background.

The complete code is shown:

Function PAX=prettyAxes (ax)% @ author:slandarer% = =% Show all optional axes themes% prettyAxes () .theme ()% -% prettyAxes (ax) .dark ()% prettyAxes () .ggray () if nargin

Tags: Functions files areas coordinates themes code background knowledge information commands properties tools folders white industry style mouse update move different Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Docker Shulou Tech Info Xiaomi MariaDB