MAPLE: Superimpose graphs of 10 discontinuous functions

Click For Summary
SUMMARY

This discussion centers on superimposing graphs of 10 discontinuous functions using MAPLE software. The user seeks guidance on plotting piecewise functions, adding a legend for clarity, and customizing colors for each graph. Key issues include the inability to display more than six functions simultaneously and the presence of an unwanted label in the legend. The user has provided specific function definitions for two days of data and requires step-by-step instructions to achieve their assignment goals.

PREREQUISITES
  • Basic understanding of piecewise functions
  • Familiarity with MAPLE software
  • Knowledge of graphing concepts
  • Ability to modify and troubleshoot code
NEXT STEPS
  • Learn how to define piecewise functions in MAPLE
  • Research how to customize legends in MAPLE plots
  • Explore color customization options for graphs in MAPLE
  • Investigate techniques for plotting multiple functions on a single graph in MAPLE
USEFUL FOR

This discussion is beneficial for students, educators, and researchers who need to visualize multiple discontinuous functions using MAPLE, particularly those with limited programming experience.

kingwinner
Messages
1,266
Reaction score
0
Hi,

I'm working on an assignment which requires me to superimpose the graphs of 10 different discontinuous functions on the same graph. Can someone please explain step-by-step how to do so in MAPLE? By the way, I have absolutely no experience in any computer programming in any form and I've never used Maple before...sigh.

The horizontal axis is time (t) and the vertical axis is foward rate (f(t)).
Function 1: (Jan 20 data)
For 0<t<1, f(t)=t+2
For t=1, f(t)=4
For 1<t<2, f(t)=2t+3
For t=2, f(t)=9
For 2<t<3, f(t)=2t+7

Function 2: (Jan 21 data)
For 0<t<1, g(t)=t+3
For t=1, g(t)=5
For 1<t<2, g(t)=2t+4
For t=2, g(t)=10
For 2<t<3, g(t)=3t+6

etc...I have similar functions, 10 in total, and I need to superimpose all of them on the same graph.

Furthermore, how can I add a legend clearing labelling each graph as "Jan 20" for graph of function 1, "Jan 21 "for graph of function 2,..., and "Jan29" for graph of function 10?

Any help would be very much appreciated! :)
 
Physics news on Phys.org
So I did some search on the internet and tried to modify some MAPLE code and I got something like the following.

mathfin2.JPG


And now I have some troubles...

1) In the legend part, I don't know why but there is a label "Points 1". How can I remove it from the legend?

2) How can I change the "color" of the curves for each day? (e.g. I want blue for Jan 17, purple for Jan 18, etc., and I need 10 clearly distinguishable colors in total.)

Please help! Anyone?
 
So I typed in 7 of the piecewise functions, but Maple refuses to overlap/superimpose more than 6 functions on the same graph, how can I fix this problem? Is it possible to overlap more than 6 functions on the same graph in MAPLE? Does anyone know?

Help, please!
 
Last edited:

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 6 ·
Replies
6
Views
13K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K