Skip to main content
1-Visitor
February 25, 2015
Question

Combine two types of plots?

  • February 25, 2015
  • 2 replies
  • 2146 views

Is it possible to create a plot with two different trace types?

The idea is to plot a continuous signal using the line trace and plot a stem trace to illustrate discrete sample times on the continuous signal.

2 replies

25-Diamond I
February 25, 2015

Is it possible to create a plot with two different trace types?

Yes, thats possible.

Next time you should state which software you are using (Prime or Mathcad) and which version.

Furthermore I suggest you attach a worksheet to show in more detail what you have in mind.

19-Tanzanite
February 25, 2015

Yes. You just plot the same thing twice, and set the trace types differently for the two plots.

1-Visitor
February 26, 2015

Ah, okay. I didn't think you could set the trace type separately.

Now, what I'd like to do is have a larger range for the continuous signal and a second range with smaller intervals to illustrate different sampling frequencies. However, I'm receiving an error stating that there are too many range variables. I assume that's because the X axis is defined as t whereas my s(n) function uses n.

I can adjust the interval of t and just plot y(t) twice with one of them set to stem trace, but as I adjust the interval, the continuous plot loses "smoothness".

Thank you for the quick responses!

I'm using Mathcad Express Prime 3.0.

19-Tanzanite
February 26, 2015

You need to have two x-axis variables as well as two y-axis variables. Also note that Mathcad Prime 3.0 can't plot more than 4999 points. That is kind of pathetic, given that Mathcad 15 can plot 500,000 points, and people have been complaining about that limitation for at least a decade, but that's the way it is. I believe the number of points may be greater in the next version, but I don't know what the new limit will be.