Holiday Challenge - Bauble Analytics
RolandJones
Altair Employee
Can you produce an interesting visual of a Christmas Tree in the run up to Christmas? Perhaps start producing a static output, and then see if you can convert to a dynamic output. Hint: the Animated Plots extension might help you here. There’s no source data, you can generate any data you need within the tool. An example is shown below, but feel free to get creative and see what you can come up with! Post your solution in picture or .gif format in the comments section, and collaborate with other community members to build interesting results. Participants will also get an exclusive holiday badge!
If you need to get access to Altair RapidMiner AI Studio, you can sign up for a trial account here: https://rapidminer.com/
-3
Comments
-
-
Hello @ rjones13,
Its really amazing and superb challenge with having lot of fun,
I really appreciate your idea.
Great! If you're interested in creating a dynamic Christmas tree visual in Python, you can use libraries like Matplotlib and Animated Plots extension. Here's a simple example code to get you started:<div>import matplotlib.pyplot as plt</div><div>from matplotlib.animation import FuncAnimation</div><div><br></div><div>def draw_christmas_tree(frame):</div><div> plt.clf() # Clear the previous frame</div><div><br></div><div> # Draw the tree trunk</div><div> plt.plot([0, 0], [0, 0.1], color='brown', linewidth=20)</div><div><br></div><div> # Draw the tree branches</div><div> for i in range(1, frame + 1):</div><div> plt.plot([0, -i / 10], [0.1 + i / 10, 0.1 + i / 10], color='green', linewidth=2)</div><div> </div><div> plt.title(f'Frame {frame}')</div><div> plt.axis('off') # Turn off axis for a cleaner visual</div><div><br></div><div># Number of frames for animation</div><div>num_frames = 30</div><div><br></div><div># Create an animated plot</div><div>animation = FuncAnimation(plt.gcf(), draw_christmas_tree, frames=num_frames, interval=200, repeat=False)</div><div><br></div><div># Display the animation</div><div>plt.show()</div><div><br></div><br> <br>
-1
This discussion has been closed.