Message Boards Message Boards

2
|
13696 Views
|
22 Replies
|
32 Total Likes
View groups...
Share
Share this post:

[WSG20] Graphics and Visualizations from EIWL (Days 10, 11, 12, 13)

During week two of the Wolfram Study Group Apr 2020 (WSG20) we are looking at the following topics from Stephen Wolfram's book Elementary Introduction to the Wolfram Language:

Day 10: Chapter 4: Displaying Lists, Chapter 7: Colors and Styles, Chapter 8: Basic Graphics Objects

Day 11: Chapter 10: Images, Chapter 14: Coordinates and Graphics, Chapter 24: More Forms of Visualization

Day 12: Chapter 37: Layout and Display, Chapter 9: Interactive Manipulation

Day 13: Project of the Week and Wolfram U specials.

We are looking at videos from the Wolfram U interactive course on EIWL and also working on simple exercises and mini projects.

Feel free to post questions on the material we covered in these sessions here.

22 Replies

A simple modification of an example from the EIWL:

Style[Circle[{#, 0}, #], Hue[0.01 #^2]] & /@ Range[0, 10, .01] // Graphics

enter image description here

or

Style[Circle[{0.1 Cos@#, 0.9 Sin@#}, #], Hue[0.0091 #^2]] & /@ 
  Range[0, 11.5, .01] // Graphics

enter image description here

Posted 5 years ago

Stephen Wolfram is a colorful character.

sw = Entity["PopularCurve", "StephenWolframCurve"]["Graphics"];

SeedRandom[314];
sw /. RGBColor[___] :> RandomColor[] /. AbsoluteThickness[1] -> AbsoluteThickness[2] /. 
  Axes -> False

enter image description here

POSTED BY: Rohit Namjoshi
Graphics[{Table[{Opacity[0.2], RandomColor[], 
    EdgeForm[
     Directive[Opacity[.3], Dashed, 
      Thickness[RandomReal[{0.05, 0.1}]], RandomColor[]]], 
    Disk[RandomReal[10, 2], RandomReal[{.5, 1.}]]}, {200}]}]

enter image description here

Hi, Abrita,

I have modified a little your code:

Graphics[Table[{RGBColor[i^2/100, j^2/100, 1 - (i^2 + j^2)/200], 
   EdgeForm[
    Directive[Opacity[.977], Dashed, 
     Thickness[RandomReal[{0.05, 0.1}]], Opacity[.87], 
     Hue[(i^2 + j^2)/200]]], Disk[{i, j}, RandomReal[{.5, 1.}]]}, {i, 
   10}, {j, 10}]]

to obtain the following result:

enter image description here

(*A little bit memory intensive but nice*)
threeLavaredoPeaks = 
  GeoElevationData[Entity["Mountain", "TreCimeDiLavaredo"], 
    GeoRange -> Quantity[5, "Kilometers"], 
    GeoProjection -> Automatic, GeoZoomLevel -> 12] // Reverse;
(*Plots. Mouse over contour line will show tooltip with height value*)
GraphicsRow[{
  GeoContourPlot[
   Reverse@GeoElevationData[
     GeoBoundingBox[
      GeoDisk[Entity["Mountain", "TreCimeDiLavaredo"], 
       Quantity[5, "Kilometers"]]], Automatic, "GeoPosition", 
     GeoZoomLevel -> 12], GeoBackground -> "Satellite", 
   ContourStyle -> White, ImageSize -> 450],
  ListContourPlot[threeLavaredoPeaks, ColorFunction -> "DarkTerrain", 
   ContourLabels -> Automatic, ImageSize -> 600], 
  ReliefPlot[threeLavaredoPeaks, ColorFunction -> "DarkTerrain", 
   ImageSize -> 550]
  }, Spacings -> {10, 0}, ImageSize -> 1000]

enter image description here

(*3D plot*)
ListPlot3D[threeLavaredoPeaks, Mesh -> None, 
 ColorFunction -> "DarkTerrain", ImageSize -> 900]

enter image description here

Daily challenge (Day 10): Here is an interesting read on how "The Wolfram Language Bridges Mathematics and the Arts". For today's challenge post an interesting piece of graphics you created with the Wolfram Language.

WOW , Real Nice!!!!

POSTED BY: Andrew Skipor
Posted 5 years ago
nearestMountain = GeoNearest["Mountain", Here] // First;
elevationData = 
 GeoElevationData[nearestMountain,
   GeoRange -> Quantity[5, "Kilometers"],
   UnitSystem -> "Metric"];

ListContourPlot[Reverse@elevationData, ColorFunction -> "LightTerrain"]

enter image description here

Turns out that the mountain nearest me has higher elevations within 5 km than the mountain itself.

POSTED BY: Rohit Namjoshi
elevations = 
  GeoElevationData[
   GeoBoundingBox@
    GeoDisk[Entity["Mountain", "Moldoveanu"], 
     Quantity[5, "Kilometers"]], Automatic, "GeoPosition", 
   GeoZoomLevel -> 10];
GeoContourPlot[elevations, GeoBackground -> "ReliefMap", 
 ContourShading -> True, ColorFunction -> Hue, 
 PlotLegends -> Automatic]

enter image description here

Manipulate[
 BarChart[{b1, b2, b3, b4}, LabelingFunction -> Center, 
  PlotRange -> {All, {0, 10}}],
 Row[{
   Control[{{b1, 0, "b1"}, 0, 10, 1, Appearance -> "Labeled"}],
   Control[{{b2, 0, "b2"}, 0, 10, 1, Appearance -> "Labeled"}],
   Control[{{b3, 0, "b3"}, 0, 10, 1, Appearance -> "Labeled"}],
   Control[{{b4, 0, "b4"}, 0, 10, 1, Appearance -> "Labeled"}]
   }],
 ControlPlacement -> Right, ControlType -> VerticalSlider
 ]

enter image description here

Posted 5 years ago
Manipulate[
 BarChart[{a, b, c, d},
  PlotRange -> {0, 10},
  LabelingFunction -> Top,
  ChartLabels -> Placed[{"a", "b", "c", "d"}, Above],
  ColorFunction -> "Rainbow"],
 {a, 0, 10}, {b, 0, 10}, {c, 0, 10}, {d, 0, 10}]

enter image description here

POSTED BY: Rohit Namjoshi
Manipulate[
 BarChart[{a[[1]], a[[2]], b[[1]], b[[2]]}, 
  ChartLabels -> {"\!\(\*SubscriptBox[\(a\), \(1\)]\)", 
    "\!\(\*SubscriptBox[\(a\), \(2\)]\)", 
    "\!\(\*SubscriptBox[\(b\), \(1\)]\)", 
    "\!\(\*SubscriptBox[\(b\), \(2\)]\)"}, LabelingFunction -> Above, 
  PlotRange -> {-0.5, 10.2}, ChartElementFunction -> "GlassRectangle",
   ChartStyle -> "Pastel", PlotTheme -> "Business"], 
 Row[{Control[{{a, {3, 1}}, {0, 0}, {10, 10}, 
     Appearance -> "Labeled"}], 
   Control[{{b, {7, 10}}, {0, 0}, {10, 10}, 
     Appearance -> "Labeled"}]}]]

enter image description here

Here's mine:

Manipulate[
 BarChart[{a, b, c, d}, ChartStyle -> "DarkRainbow", 
  ColorFunction -> 
   Function[{x}, 
    Directive[ ColorData["DarkRainbow"][x], 
     EdgeForm[{Thickness[x/100], Dashed, RandomColor[]}]]], 
  ChartLabels -> {"a", "b", "c", "d"}, PlotRange -> {0, 10}, 
  ImagePadding -> 10], {{a, 2}, Range[0, 10]}, {{b, 4}, Range[0, 10], 
  ControlType -> SetterBar}, {{c, 6}, 0, 10, 1}, {{d, 8}, 
  Button["Pick a number between 0 and 10", 
    d = RandomInteger[{0, 10}]] &}, 
 ControlPlacement -> {Top, Top, Bottom, Bottom}]

enter image description here

Posted 5 years ago

Hello, These are representations of a scaling of the solar system over a GAA pitch and the scaling of some incidents of the timeline of the Universe over a GAA pitch that I made for a quarantine quiz with friends over the weekend.
GAA is the governing organisation covering some Irish sports. Hurling and Gaelic Football are played on these style pitches.
Whenever we get back to training and playing matches now, hopefully I will also be revising my appreciation for these scales of our existence. I'll add more elements in future but that should be quite straightforward now hopefully.

Donnacha

The Solar system planets scaled over a GAA pitch Universe Timeline scaled over a GAA pitch

POSTED BY: Donnacha Gayer

This is GREAT!

POSTED BY: Andrew Skipor

Daily challenge (Day 11): Create a contour plot of a 5 km radius around the nearest mountain peak to wherever you are situated.

Thanks for the amazing contour plots!!! Remember no study group today but please feel free to check out the second session of our "New in Wolfram Language 12.1" webinar series at

Daily Challenge (Day 12): This one is again from EIWL (Chapter 9).

Make a Manipulate to show a bar chart with 4 bars, each with a height that can be between 0 and 10

Daily Challenge (Day 12): Share with us an interesting piece of data visualization from your work/study/reasearch.

Hello, I like these elegant BarChart solutions. I’m a beginner and took a more “direct” approach. But then I thought how to bring some uniqueness to the solution. I thought it would be cool to use a speech synthesizer that verbalizes the height of the histogram bars. I found a speech synthesizer but the problem I face is how to take the adjustable bar height numerical value; convert it to text; and have the text inserted into the speech synthesizer. Any suggestions would be very helpful . I've attached my bar-chart program.

Thank you very much, Andrew Skipor

Attachments:
POSTED BY: Andrew Skipor

Try this route:

a = 4;
Speak["Height of the column is " <> ToString[a]]

Thank you very much.This is a big help! Andrew Skipor

POSTED BY: Andrew Skipor
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract