Examples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.plot()
# Examples below assume that element constructors are imported# e.g. `import GGity.Element.{Line, Rect, Text}# Plot formattingExamples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(plot_title:element_text(size:10))|>Plot.plot()
Examples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(plot_background:element_rect(fill:"green"))|>Plot.plot()
# Panel formattingExamples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(panel_background:element_rect(fill:"white",color:"grey"))|>Plot.plot()
Examples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(panel_grid_major:element_line(color:"black"))|>Plot.plot()
# Axis formattingExamples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(axis_line:element_line(size:6,color:"grey"))|>Plot.plot()
Examples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(axis_text:element_text(color:"blue"))|>Plot.plot()
Examples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(axis_ticks:element_line(size:4))|>Plot.plot()
# Turn the x-axis ticks inwardExamples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point()|>Plot.labs(title:"Fuel economy declines as weight decreases")|>Plot.theme(axis_ticks_length_x:-2)|>Plot.plot()
# GGity does not support legend position, but legend key boxes# and text can be styled as you would expect# Default stylingExamples.mtcars()|>Plot.new(%{x::wt,y::mpg})|>Plot.geom_point(%{color::cyl,shape::vs})|>Plot.labs(x:"Weight (1000 lbs)",y:"Fuel economy (mpg)",color:"Cylinders",shape:"Transmission")|>Plot.plot()