Shapes

Shape.square and friends

using Gadfly, RDatasets
set_default_plot_size(21cm, 8cm)

p1 = plot(dataset("HistData","DrinksWages"), x="Wage", y="Drinks",
    shape=[Shape.square], Scale.y_log10)

aww, mws = dataset("MASS", "Animals"), dataset("quantreg", "Mammals")
p2 = plot( layer(aww, x=:Body, y=:Brain, shape=["Brain weight"]),
    layer(mws, x=:Weight, y=:Speed, shape=["Run speed"]),
    Scale.x_log10, Scale.y_log10, Guide.xlabel("Body weight"),
    Guide.ylabel("Brain weight and Run speed"),
    Theme(point_shapes=[Shape.circle, Shape.star1], alphas=[0.0],
        discrete_highlight_color=identity) )
hstack(p1, p2)
Body weight 10-2 100 102 104 106 10-2.0 10-1.5 10-1.0 10-0.5 100.0 100.5 101.0 101.5 102.0 102.5 103.0 103.5 104.0 104.5 105.0 105.5 106.0 10-2.00 10-1.95 10-1.90 10-1.85 10-1.80 10-1.75 10-1.70 10-1.65 10-1.60 10-1.55 10-1.50 10-1.45 10-1.40 10-1.35 10-1.30 10-1.25 10-1.20 10-1.15 10-1.10 10-1.05 10-1.00 10-0.95 10-0.90 10-0.85 10-0.80 10-0.75 10-0.70 10-0.65 10-0.60 10-0.55 10-0.50 10-0.45 10-0.40 10-0.35 10-0.30 10-0.25 10-0.20 10-0.15 10-0.10 10-0.05 100.00 100.05 100.10 100.15 100.20 100.25 100.30 100.35 100.40 100.45 100.50 100.55 100.60 100.65 100.70 100.75 100.80 100.85 100.90 100.95 101.00 101.05 101.10 101.15 101.20 101.25 101.30 101.35 101.40 101.45 101.50 101.55 101.60 101.65 101.70 101.75 101.80 101.85 101.90 101.95 102.00 102.05 102.10 102.15 102.20 102.25 102.30 102.35 102.40 102.45 102.50 102.55 102.60 102.65 102.70 102.75 102.80 102.85 102.90 102.95 103.00 103.05 103.10 103.15 103.20 103.25 103.30 103.35 103.40 103.45 103.50 103.55 103.60 103.65 103.70 103.75 103.80 103.85 103.90 103.95 104.00 104.05 104.10 104.15 104.20 104.25 104.30 104.35 104.40 104.45 104.50 104.55 104.60 104.65 104.70 104.75 104.80 104.85 104.90 104.95 105.00 105.05 105.10 105.15 105.20 105.25 105.30 105.35 105.40 105.45 105.50 105.55 105.60 105.65 105.70 105.75 105.80 105.85 105.90 105.95 106.00 10-2 100 102 104 106 Brain weight Run speed Shape 0.60205999132796240.2041199826559248 -1.61978875828839391.1139433523068367 0.69897000433601890.8692317197309762 1.69897000433601871.8129133566428555 0.176091259055681241.6020599913279623 0.176091259055681241.6989700043360187 0.27875360095282891.7481880270062005 0.30102999566398121.806179973983887 0.54406804435027571.7481880270062005 0.60205999132796241.8573324964312685 0.64345267648618741.8573324964312685 0.66275783168157411.806179973983887 -1.79588001734407520.5563025007672873 -1.00.38021124171160603 -1.00.6020599913279624 -1.79588001734407521.1139433523068367 -1.7447274948966940.9493900066449128 -1.60205999132796230.9344984512435677 -1.60205999132796231.0413926851582251 -1.52287874528033760.9590413923210935 -1.52287874528033760.8325089127062363 -1.45593195564972431.146128035678238 -1.45593195564972431.505149978319906 -1.34678748622465631.2041199826559248 -1.30102999566398131.0413926851582251 -1.25181197299379951.3222192947339193 -1.01.2304489213782739 -0.9586073148417750.9542425094393249 -0.65757731917779371.1760912590556813 -0.60205999132796240.9867717342662449 -0.52287874528033761.1139433523068367 -0.39794000867203761.3010299956639813 -0.30102999566398121.255272505103306 -0.25963731050575611.4313637641589874 -0.22184874961635641.3010299956639813 -0.22184874961635641.5563025007672873 0.60205999132796241.2041199826559248 0.95424250943932490.505149978319906 1.11394335230683671.568201724066995 1.8450980400142571.6020599913279623 2.1038037209559571.505149978319906 0.477121254719662441.2041199826559248 0.69897000433601891.4313637641589874 0.69897000433601891.806179973983887 0.77815125038364361.8573324964312685 0.84509804001425681.7781512503836436 1.01.7481880270062005 1.04139268515822511.4771212547196624 1.07918124604762491.380211241711606 1.20411998265592481.8129133566428555 1.30102999566398131.845098040014257 1.39794000867203771.8260748027008264 1.60205999132796231.806179973983887 1.65321251377534371.6989700043360187 1.74036268949424392.041392685158225 1.77815125038364361.7781512503836436 1.81291335664285551.8129133566428555 2.1303337684950061.6812412373755872 2.17609125905568131.7708520116421442 2.3617278360175931.7481880270062005 2.47712125471966261.6812412373755872 2.60205999132796251.6020599913279623 1.30102999566398131.9084850188786497 1.47712125471966241.6532125137753437 1.47712125471966241.9030899869919435 1.47712125471966241.9867717342662448 1.53147891704225511.9867717342662448 1.54406804435027571.9030899869919435 1.5682017240669952.0211892990699383 1.69897000433601871.6720978579357175 1.69897000433601871.6020599913279623 1.69897000433601871.7781512503836436 1.69897000433601872.0 1.7923916894982541.9084850188786497 1.81291335664285551.7781512503836436 1.8450980400142571.6532125137753437 1.85733249643126851.7481880270062005 1.90308998699194351.8129133566428555 1.92941892571429261.7403626894942439 2.01.806179973983887 2.0413926851582251.5185139398778875 2.07918124604762471.7853298350107671 2.07918124604762471.9030899869919435 2.1139433523068371.845098040014257 2.17609125905568131.6812412373755872 2.2304489213782741.9030899869919435 2.39794000867203751.7481880270062005 2.39794000867203751.9030899869919435 2.47712125471966261.954242509439325 2.47712125471966261.8573324964312685 2.65321251377534351.7481880270062005 2.69897000433601871.505149978319906 2.87506126339171.7558748556724915 2.90308998699194381.462397997898956 2.95424250943932481.7481880270062005 2.95424250943932481.845098040014257 3.01.7781512503836436 3.579783596616811.3979400086720377 2.39794000867203751.6020599913279623 2.41497334797081781.845098040014257 2.47712125471966261.806179973983887 2.54406804435027571.845098040014257 2.60205999132796251.845098040014257 3.1461280356782381.6532125137753437 3.47712125471966261.3979400086720377 3.60205999132796251.414973347970818 3.77815125038364341.5440680443502757 2.28330122870354972.255272505103306 -0.91364016932525180.47712125471966244 4.9395192526186182.1889284837608534 -0.55284196865778080.2787536009528289 1.71733758272386372.6434526764861874 2.02.1958996524092336 1.74429298312267632.2430380486862944 0.39794000867203761.08278537031645 -1.6382721639824072-0.3979400086720376 -0.92081875395237520.0 1.54406804435027571.7481880270062005 0.83250891270623632.2528530309798933 3.97312785359969881.845098040014257 3.82308279653280363.7567881987681178 1.7923916894982543.12057393120585 2.3159703454569182.6085260335771943 2.72345567203518572.832508912706236 0.51851393987788741.4082399653118496 1.02.060697840353612 2.71683772329952472.816241299991783 2.272073787500012.622214022966295 3.4060289449636153.663040974893974 4.0681858617461611.6989700043360187 0.017033339298780370.7403626894942439 1.44185217577329182.060697840353612 1.56026539786271462.0773679052841563 2.6674529528899542.6263403673750423 0.130333768495006140.9084850188786497 h,j,k,l,arrows,drag to pan i,o,+,-,scroll,shift-drag to zoom r,dbl-click to reset c for coordinates ? for help ? 10-1 100 101 102 103 104 10-1.0 10-0.8 10-0.6 10-0.4 10-0.2 100.0 100.2 100.4 100.6 100.8 101.0 101.2 101.4 101.6 101.8 102.0 102.2 102.4 102.6 102.8 103.0 103.2 103.4 103.6 103.8 104.0 10-1.00 10-0.98 10-0.96 10-0.94 10-0.92 10-0.90 10-0.88 10-0.86 10-0.84 10-0.82 10-0.80 10-0.78 10-0.76 10-0.74 10-0.72 10-0.70 10-0.68 10-0.66 10-0.64 10-0.62 10-0.60 10-0.58 10-0.56 10-0.54 10-0.52 10-0.50 10-0.48 10-0.46 10-0.44 10-0.42 10-0.40 10-0.38 10-0.36 10-0.34 10-0.32 10-0.30 10-0.28 10-0.26 10-0.24 10-0.22 10-0.20 10-0.18 10-0.16 10-0.14 10-0.12 10-0.10 10-0.08 10-0.06 10-0.04 10-0.02 100.00 100.02 100.04 100.06 100.08 100.10 100.12 100.14 100.16 100.18 100.20 100.22 100.24 100.26 100.28 100.30 100.32 100.34 100.36 100.38 100.40 100.42 100.44 100.46 100.48 100.50 100.52 100.54 100.56 100.58 100.60 100.62 100.64 100.66 100.68 100.70 100.72 100.74 100.76 100.78 100.80 100.82 100.84 100.86 100.88 100.90 100.92 100.94 100.96 100.98 101.00 101.02 101.04 101.06 101.08 101.10 101.12 101.14 101.16 101.18 101.20 101.22 101.24 101.26 101.28 101.30 101.32 101.34 101.36 101.38 101.40 101.42 101.44 101.46 101.48 101.50 101.52 101.54 101.56 101.58 101.60 101.62 101.64 101.66 101.68 101.70 101.72 101.74 101.76 101.78 101.80 101.82 101.84 101.86 101.88 101.90 101.92 101.94 101.96 101.98 102.00 102.02 102.04 102.06 102.08 102.10 102.12 102.14 102.16 102.18 102.20 102.22 102.24 102.26 102.28 102.30 102.32 102.34 102.36 102.38 102.40 102.42 102.44 102.46 102.48 102.50 102.52 102.54 102.56 102.58 102.60 102.62 102.64 102.66 102.68 102.70 102.72 102.74 102.76 102.78 102.80 102.82 102.84 102.86 102.88 102.90 102.92 102.94 102.96 102.98 103.00 103.02 103.04 103.06 103.08 103.10 103.12 103.14 103.16 103.18 103.20 103.22 103.24 103.26 103.28 103.30 103.32 103.34 103.36 103.38 103.40 103.42 103.44 103.46 103.48 103.50 103.52 103.54 103.56 103.58 103.60 103.62 103.64 103.66 103.68 103.70 103.72 103.74 103.76 103.78 103.80 103.82 103.84 103.86 103.88 103.90 103.92 103.94 103.96 103.98 104.00 10-2 100 102 104 Brain weight and Run speed Wage 0 10 20 30 40 0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6 3.8 4.0 4.2 4.4 4.6 4.8 5.0 5.2 5.4 5.6 5.8 6.0 6.2 6.4 6.6 6.8 7.0 7.2 7.4 7.6 7.8 8.0 8.2 8.4 8.6 8.8 9.0 9.2 9.4 9.6 9.8 10.0 10.2 10.4 10.6 10.8 11.0 11.2 11.4 11.6 11.8 12.0 12.2 12.4 12.6 12.8 13.0 13.2 13.4 13.6 13.8 14.0 14.2 14.4 14.6 14.8 15.0 15.2 15.4 15.6 15.8 16.0 16.2 16.4 16.6 16.8 17.0 17.2 17.4 17.6 17.8 18.0 18.2 18.4 18.6 18.8 19.0 19.2 19.4 19.6 19.8 20.0 20.2 20.4 20.6 20.8 21.0 21.2 21.4 21.6 21.8 22.0 22.2 22.4 22.6 22.8 23.0 23.2 23.4 23.6 23.8 24.0 24.2 24.4 24.6 24.8 25.0 25.2 25.4 25.6 25.8 26.0 26.2 26.4 26.6 26.8 27.0 27.2 27.4 27.6 27.8 28.0 28.2 28.4 28.6 28.8 29.0 29.2 29.4 29.6 29.8 30.0 30.2 30.4 30.6 30.8 31.0 31.2 31.4 31.6 31.8 32.0 32.2 32.4 32.6 32.8 33.0 33.2 33.4 33.6 33.8 34.0 34.2 34.4 34.6 34.8 35.0 35.2 35.4 35.6 35.8 36.0 36.2 36.4 36.6 36.8 37.0 37.2 37.4 37.6 37.8 38.0 38.2 38.4 38.6 38.8 39.0 39.2 39.4 39.6 39.8 40.0 0 50 40.0,-Inf 32.00.3010299956639812 31.0833333330.3010299956639812 36.5,-Inf 36.0833333330.3010299956639812 31.5833333330.6020599913279624 40.0,-Inf 34.50.6989700043360189 31.5833333330.0 31.0833333331.2041199826559248 30.1666666670.3010299956639812 38.8333333330.6989700043360189 34.0833333331.2304489213782739 30.8333333330.0 30.8333333330.9542425094393249 33.5,0.0 37.0,-Inf 32.5,0.0 32.5833333330.6020599913279624 36.00.3010299956639812 30.250.7781512503836436 36.50.3010299956639812 34.0,-Inf 27.0,0.0 27.0,-Inf 28.00.3010299956639812 27.25,-Inf 26.1666666671.0 30.0,0.0 27.6666666670.0 25.51.3617278360175928 30.0,0.0 28.0,-Inf 30.0,-Inf 26.00.3010299956639812 28.50.6020599913279624 27.01.1760912590556813 30.0,-Inf 28.0,0.0 28.4166666670.6989700043360189 27.0,0.0 26.00.6989700043360189 25.00.47712125471966244 25.0,-Inf 25.00.47712125471966244 18.51.9294189257142926 18.0,-Inf 12.00.47712125471966244 20.0,0.0 18.00.3010299956639812 20.5,-Inf 18.5,-Inf 20.0,-Inf 13.5,-Inf 24.1666666670.3010299956639812 23.0,0.0 22.8333333330.3010299956639812 22.8333333330.9542425094393249 21.50.6020599913279624 23.666666667-Inf 22.1666666671.3617278360175928 17.3333333330.8450980400142568 23.00.6989700043360189 24.3333333330.3010299956639812 20.50.9030899869919435 19.0,-Inf 21.1666666670.6989700043360189 21.5,0.0 18.4166666671.0 24.0,0.0 h,j,k,l,arrows,drag to pan i,o,+,-,scroll,shift-drag to zoom r,dbl-click to reset c for coordinates ? for help ? 100.0 100.5 101.0 101.5 102.0 100.0 100.1 100.2 100.3 100.4 100.5 100.6 100.7 100.8 100.9 101.0 101.1 101.2 101.3 101.4 101.5 101.6 101.7 101.8 101.9 102.0 100.00 100.01 100.02 100.03 100.04 100.05 100.06 100.07 100.08 100.09 100.10 100.11 100.12 100.13 100.14 100.15 100.16 100.17 100.18 100.19 100.20 100.21 100.22 100.23 100.24 100.25 100.26 100.27 100.28 100.29 100.30 100.31 100.32 100.33 100.34 100.35 100.36 100.37 100.38 100.39 100.40 100.41 100.42 100.43 100.44 100.45 100.46 100.47 100.48 100.49 100.50 100.51 100.52 100.53 100.54 100.55 100.56 100.57 100.58 100.59 100.60 100.61 100.62 100.63 100.64 100.65 100.66 100.67 100.68 100.69 100.70 100.71 100.72 100.73 100.74 100.75 100.76 100.77 100.78 100.79 100.80 100.81 100.82 100.83 100.84 100.85 100.86 100.87 100.88 100.89 100.90 100.91 100.92 100.93 100.94 100.95 100.96 100.97 100.98 100.99 101.00 101.01 101.02 101.03 101.04 101.05 101.06 101.07 101.08 101.09 101.10 101.11 101.12 101.13 101.14 101.15 101.16 101.17 101.18 101.19 101.20 101.21 101.22 101.23 101.24 101.25 101.26 101.27 101.28 101.29 101.30 101.31 101.32 101.33 101.34 101.35 101.36 101.37 101.38 101.39 101.40 101.41 101.42 101.43 101.44 101.45 101.46 101.47 101.48 101.49 101.50 101.51 101.52 101.53 101.54 101.55 101.56 101.57 101.58 101.59 101.60 101.61 101.62 101.63 101.64 101.65 101.66 101.67 101.68 101.69 101.70 101.71 101.72 101.73 101.74 101.75 101.76 101.77 101.78 101.79 101.80 101.81 101.82 101.83 101.84 101.85 101.86 101.87 101.88 101.89 101.90 101.91 101.92 101.93 101.94 101.95 101.96 101.97 101.98 101.99 102.00 100 102 Drinks