Create a Custom Graph Theme

Learn how to create a custom graph theme. DataGraph has a style sheet approach that lets you separate the graph options from the style of a graph. Customize colors, backgrounds, gridlines, tickmarks, and more to create your themes. Create styles and themes that can be appiled to new graphs and moved between files. This webinar will feature examples from DataGraph’s new ‘Themes’ example files.

Video

0:00 Introduction
0:49 One thing you must know! Copy and Paste Styles
2:49 Apply Styles to Multiple Graphs
4:28 Three things Great about DG Styles
8:20 Overview of Layout settings
15:15 Q&A How to make templates?
18:31 Overview of Canvas
20:22 Graph Themes, font and sizing
27:50 Q&A How to fix axis points?
32:06 How to Edit Line& Fill Colors
37:30 How to Set Background Colors
38:06 How to Set Gridlines
41:22 Using Extra Axis Command
47:20 Q&A How to create a broken axis?

Style settings

OPTIONDEFAULTGGPLOT2MATLAB®B&W
Main fontHelvetica 12Arial 11Helvetica 14LaTeX/Roman 8
Font ScalingAxis Font: -17%Axis Font: -23%
ColorsQualitative ColorBrewer6 Hue Pallet
GGPLOT2
RGB Triplet
MathWorks.com
Black & White
Error Colorredblackblackblack
Box StyleOne BoxOnly AxisAxis BoxAxis Box
Gridx & y
Grid Line StyleSolid, White, width=pen
Minor Gridx & y
Minor Grid StyleSolid, White,
width=pen/2
Tick marksOutsideOutsideInsideOutside
Tick mark SizeMediumSmallMediumMedium
Minor Tick marksOnOn
MirroredOn

The GGPLOT2 color hex codes were obtained by running the following code in R.

library(scales)
show_col(hue_pal()(6))

HEX CODES: #00BFC4, #F8766D, #619CFF, #B79F00, #F564E3, #00BA38

Canvas settings

OPTIONDEFAULTGGPLOT2MATLAB®B&W
Size5in,3in5in,3in8in,6in2.5in,2in
Title PositionAxis CenterAxis LeftAxis CenterNone
Title FontMain fontMain font
Scaled +30%
Main font
Bold
Axis Background#E6E6E6
GridNoneMajorNoneNone

Axis settings

OPTIONDEFAULTGGPLOT2MATLAB®B&W
Size5in,3in5in,3in8in,6in2.5in,2in
Title PositionAxis CenterAxis LeftAxis CenterNone
Title FontMain fontMain font
Scaled +30%
Main font
Bold
Axis Background#E6E6E6
Draw x/yYesNoYesYes
Extra AxisX & Y
Drawing StyleNo Line

Other settings

GGPLOT2

  • Axis Below Zero
  • No Lines Around Fill
  • Legend Center Right

MatLab

  • Bar Width = 0.5
  • Between Bars = 0.05

Black & White

  • Fill Types set to pattern

Posted

in

by

Tags:

Comments

Leave a Reply