Julia Plotsパッケージの追加
Pkg modeに入る方法
juliaコマンドを実行して、REPL(対話モード)になっている状態で、]を入力する。
そうすると、プロンプトが (v1.0) pkg> に変わる。
Pkg modeから抜けるには、BackSpaceを押すか、Ctrl+cを入力する。
Pkg modeでhelpと入力すると、下記のようにhelpが表示される。
(v1.0) pkg> help
Welcome to the Pkg REPL-mode. To return to the julia> prompt, either press backspace when the
input line is empty or press Ctrl+C.
Synopsis
pkg> cmd [opts] [args]
Multiple commands can be given on the same line by interleaving a ; between the commands.
Commands
activate: set the primary environment the package manager manipulates
add: add packages to project
build: run the build script for packages
develop: clone the full package repo locally for development
free: undoes a pin, develop, or stops tracking a repo
gc: garbage collect packages not used for a significant time
generate: generate files for a new project
help: show this message
instantiate: downloads all the dependencies for the project
pin: pins the version of packages
precompile: precompile all the project dependencies
preview: previews a subsequent command without affecting the current state
remove: remove packages from project or manifest
resolve: resolves to update the manifest from changes in dependencies of developed packages
status: summarize contents of and changes to environment
test: run tests for packages
update: update packages in manifest
addコマンドでパッケージの追加ができる。
addコマンドのhelpを見るには、help addと入力する。
Plotsパッケージの追加方法
(v1.0) pkg> add Plots
インストール済みのパッケージ一覧を表示したい場合は、
Pkg modeを抜けて、REPLに戻って、下記のように入力する。
julia> import Pkg
julia> Pkg.installed()