官术网_书友最值得收藏!

Adding a new package

Before adding a new package, it is always a good idea to update your package database for the already installed packages with the up command. Then, add a new package by issuing the add PackageName command, and execute it by using PackageName in the code or in the REPL.

For example, to add 2D plotting capabilities, install the Plots package with add Plots in the Package mode by first typing ]. This installs the Plots package and all of its dependencies, building them when needed.

To make a graph of 100 random numbers between 0 and 1, execute the following commands:

using Plots 
plot(rand(100))

The rand(100) function is an array with 100 random numbers. This produces the following output:

A plot of white noise with Plots

After installing a new Julia version, update all the installed packages by running up in the Pkg REPL-mode.

主站蜘蛛池模板: 炎陵县| 五大连池市| 萨迦县| 于田县| 辽阳市| 仲巴县| 镇康县| 巴塘县| 定州市| 开鲁县| 会昌县| 册亨县| 剑河县| 长顺县| 海南省| 和田市| 萨迦县| 宣威市| 库尔勒市| 伽师县| 碌曲县| 沁源县| 邯郸县| 仁布县| 麟游县| 达孜县| 长沙县| 确山县| 泾阳县| 绿春县| 陇川县| 海伦市| 北辰区| 新巴尔虎左旗| 鄂温| 文安县| 抚宁县| 古浪县| 报价| 张家口市| 任丘市|