32
GLASS Plotting Tips,Tricks and Advice Brett Salmon 4/4/14

“The astronomical journals in which cutting-edge results appear have changed little in the last century, and in many ways, astronomers have never

Embed Size (px)

Citation preview

GLASS

Plotting Tips,Tricks and Advice

Brett Salmon 4/4/14

“The astronomical journals in which cutting-edge results appear have changed little in the last century, and in many ways, astronomers have never even taken advantage of the innovations of “The Golden Age of Statistical Graphics” that took place during the second half of the 19th Century.”

- Alyssa Goodman

The Golden Age of Plotting is Back

Michael Friendly (2009)

What can you do to improve your plots?

Make the size of your graph, the size it would appear on the page

http://www.astrobetter.com/making-fonts-better-in-idl-postscript-output/

Helps keep all Figures consistent in character size

Lock up that aspect ratio. LOCK IT UP.

Be Able to Understand the Plot Without the Caption

Use Legends! Save that extra caption sentence for summarizing the main point of the plot

Are the figure labels the same size as the body text?

IDL> !p.font=0

Always re-plot thick axes at the end of your procedure axis,color=fsc_color('black'),xtickformat='(A1)', xaxis=0, xthick=6, ythick=6

axis,color=fsc_color('black'),xtickformat='(A1)', xaxis=1, xthick=6, ythick=6axis,color=fsc_color('black'),ytickformat='(A1)', yaxis=0, xthick=6, ythick=6axis,color=fsc_color('black'),ytickformat='(A1)', yaxis=1, xthick=6, ythick=6

Plot Straight to File in Python

http://www.astrobetter.com/plotting-to-a-file-in-python/

Allows you to make plots without a window popping up

Useful for scripts running on a cluster

Faster!

Pick Pretty Colors A many-colored plot

Can you easily distinguish each color, if placed at random?

Do outlier colors stand out, and distinguish from other outliers?

Colorful figures pop out, and excite readers

See http://colorbrewer2.org/#

Outline Individual points Your points should be the biggest, brightest, and

boldest

Use shading, or outlining of every point (or even line!)

Create the effect of layers with muted colors or fuzz

Avoid Crowded Points http://www.astrobetter.com/slim-down-your-bloated-g

raphics/

They create large plot files, making scrolling a pain

Avoid Crowded Points (2)

How is this plot informative?

Allows more information for less file size

original figure: Belanger et al. 2013, Epidemiology

Avoid Confusing Linestyles

NO2 (ppb, log scale)

Odds

Rati

o

2 8 32 128

0.3

0.5

1.0

2.0

Think of Something New

Look for creative plots on astro-ph

Draw how you want to show your result, completely unrestricted from the code

Make it your trademark – a symbol, color scheme, or creative technique that becomes associated with you

Think of Something New: Examples

Think of Something New: Examples

Think of Something New: Examples

Think of Something New: Examples

Useful Tools to Display Your Data

GraphClick http://www.astrobetter.com/digitize-that-figure-fast/

Pull values of data from a graph

Glue(see video)

yt Project

Authorea (see video)

Filtergraph