Module: Rust::Plots::GGPlot

Defined in:
lib/rust/external/ggplot2/core.rb,
lib/rust/external/ggplot2/geoms.rb,
lib/rust/external/ggplot2/helper.rb,
lib/rust/external/ggplot2/themes.rb,
lib/rust/external/ggplot2/plot_builder.rb

Defined Under Namespace

Classes: Aes, FlipCoordinates, Geom, GeomBar, GeomBoxplot, GeomCol, GeomDensity, GeomHistogram, GeomLine, GeomPoint, Labels, Layer, Plot, PlotBuilder, Theme, ThemeAxisBuilder, ThemeBuilder, ThemeComponentBuilder, ThemeLegendBuilder, ThemePanelBuilder

Class Method Summary collapse

Class Method Details

.default_themeObject



6
7
8
# File 'lib/rust/external/ggplot2/core.rb', line 6

def self.default_theme
    @@theme
end

.default_theme=(theme) ⇒ Object



10
11
12
# File 'lib/rust/external/ggplot2/core.rb', line 10

def self.default_theme=(theme)
    @@theme = theme.freeze
end

.help!(topic = nil) ⇒ Object



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/rust/external/ggplot2/helper.rb', line 103

def self.help!(topic = nil)
    unless topic
        puts "Topics:"
        GGPLOT_EXAMPLES.keys.each do |key, matcher|
            puts "- #{key}"
        end
        puts "Call again specifying the topic of interest."
    else
        GGPLOT_EXAMPLES.each do |key, value|
            if topic.match(key[1])
                puts "*** #{key[0]} ***"
                puts value
                return
            end
        end
        
        puts "Topic not found"
    end
end