@@ -49,50 +49,6 @@ sgplot(
4949
5050![ hist_ex] ( assets/hist_ex.svg )
5151
52- ** Dubai Weather**
53-
54- ``` julia
55- using DLMReader
56- dubai_weather = filereader (" assets/dubai_weather.csv" , types= Dict (1 => Date))
57- sgplot (
58- dubai_weather,
59- [
60- Band (x= :date , lower= :min , upper= :max ),
61- Line (x= :date , y= :min , color= " #4682b4" , thickness= 1 ),
62- Line (x= :date , y= :max , color= " #ff7f0e" , thickness= 0.5 ),
63- Line (x= :date , y= :pressure , color= " #2ca02c" , y2axis= true , breaks= true ),
64- Scatter (x= :date , y= :pressure , outlinecolor= " #2ca02c" , size= 10 , y2axis= true )
65- ],
66- xaxis= Axis (offset= 10 , type= :date , grid= true , griddash= [1 , 1 ], title= " Date" ),
67- yaxis= Axis (offset= 10 , grid= true , griddash= [1 , 1 ], title= " Temperature(°C)" ),
68- y2axis= Axis (offset= 10 , title= " Pressure" )
69- )
70- ```
71-
72- ![ dubai_ex] ( assets/dubai.svg )
73-
74- Using ` BoxPlot ` to plot monthly temperature (minimum and maximum), and add second axes for plotting weekly pressure.
75-
76- ``` julia
77- modify! (dubai_weather, :date => byrow (week)=> :Week )
78- setformat! (dubai_weather, :date => month)
79-
80- sgplot (
81- dubai_weather,
82- [
83- BoxPlot (y= [:min , :max ], category= :date , outliers= true ),
84- BoxPlot (y= :pressure , category= :Week , opacity= 0.5 , y2axis= true , outliers= true , x2axis= true )
85- ],
86- xaxis= Axis (title= " Month" ),
87- yaxis= Axis (title= " Temperature" ),
88- y2axis= Axis (title= " Pressure" , d3format= " f" ),
89- x2axis= Axis (values= 3 : 4 : 53 ),
90- height= 600
91- )
92- ```
93-
94- ![ dubai_boxplot] ( assets/dubai_boxplot.svg )
95-
9652** Iris Data**
9753
9854``` julia
@@ -120,38 +76,6 @@ sgplot(
12076
12177![ iris] ( assets/iris_violin.svg )
12278
123- ** [ Box Plot] ( https://observablehq.com/@d3/box-plot ) **
124-
125- Reproducing an example from the [ ` D3 ` ] ( http://d3js.org ) `s examples collection.
126-
127- Using the ` format ` feature of ` InMemoryDataset ` to manually bin data before plotting a box plot.
128-
129- ``` julia
130- diamond = filereader (" assets/diamonds.csv" )
131- carat_fmt (x) = round ((searchsortedfirst (0.19 : 0.2 : 5.02 , x)- 2 )* .2 + 0.3 , digits= 2 )
132- setformat! (diamond, :carat => carat_fmt)
133-
134- sgplot (
135- diamond,
136- BoxPlot (y= :price , category = :carat ,
137- mediancolor= :black , medianthickness = 0.5 ,
138- fencewidth= 0 ,
139- whiskerdash= [0 ], whiskerthickness = 0.5 ,
140-
141- outliers = true ,
142- outlierjitter = 5 ,
143- outliersymbolsize= 10 ,
144- outliercolor= :black ,
145- outlieropacity= 0.1
146- ),
147- yaxis= Axis (domain = false , nice= false , grid= true ),
148- groupcolormodel= [" lightgray" ],
149- legend= false ,
150- width= 800
151- )
152- ```
153-
154- ![ diamond] ( assets/diamond.svg )
15579
15680** Bar chart**
15781
0 commit comments