Skip to content

Instantly share code, notes, and snippets.

@paulnakroshis
Created February 1, 2023 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulnakroshis/f3b338d92d102954b41951580d26aedd to your computer and use it in GitHub Desktop.
Save paulnakroshis/f3b338d92d102954b41951580d26aedd to your computer and use it in GitHub Desktop.
General Julia Import Header #Julia #Plots.jl #GR #LaTeXStrings #plot config
using Plots
gr()
using LaTeXStrings, Measures
default(fontfamily = "Computer Modern", size=(800,500), titlefont = (16), legendfontsize = 10,
guidefont = (16, :darkgreen), tickfont = (12, :black),
framestyle = :box, yminorgrid = true)
plot([sin, cos], -2π, 2π, label = [L"\sin(θ)" L"\cos(θ)"],
linewidth = 2, linealpha=0.7, legend = :outertopright)
plot!(xticks = ([-2π:π:2*π;], ["-2π", "-π", "0", "π", "2π"]))
plot!(margin=7mm, xlabel = L"\theta\;(rad)", ylabel= L"\textrm{y\; (m)}")
@paulnakroshis
Copy link
Author

Simple configuration for a nice looking plot using Computer Modern fonts, and LaTeX Strings.
Includes an example plot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment