Generating many plots
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Generating many plots
I would like to generate many plots using a range of different parameter values. I did 10 in the attached document manually using Quickplot. Is there a way to do this more efficiently especially if I would like to look at a larger number of plots? Thanks for any help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Something like this is possible:
The variable parameter k has to be a range and must be the first function argument. Guess it won't work with more than one parameter.
x must be a range and to avoid lines connecting back the first and last point of the plots you have to set the type from "line" to "draw" and make the range variable for x a littlle bit larger (1.02( than the manually set plot limit (1).
Drawbacks are:
You can't use different colors or line styles - all plots share the same
k must be a range and so it must be a linear scale. It does not work with a vector of selected values or a vector created with logspace (which would be more appropriate in your case, I guess).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks, as always. That was helpful and certainly more efficient than the way I was doing it. But my question was not clear. The document I posted has 10 different plots with 8 curves on each. Your answer addresses how to put multiple curves on each plot, but is there any way to generate the 10 plots except one by one. Ideally, I would like to generate more than 10. (Why do I want to do this you may ask -- because I am working with someone using Matlab. She generated 64 of these plots and I am trying to compare with her results. Probably the simpler solution is to monkey with her Matlab code, but I thought I would ask).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
There is no way in Mathcad to 'automate' the generation of plots, like it may be in MatLab.
If you have a large number of plots to generate, and you want them to show similar content, best way is to create one, shape it until you are satisfied with how it looks, then copy it as many times as you need, then edit the input variables (expressions for x- and y traces) as needed for each of them.
Success!
Luc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is a small routine which overcomes some of the drawbacks.
The abscissa values X and the parameter values k can be ranges or vectors.
No need to use "draw" or to make the x range larger than necessary.
Still just one color and line style for all plots.
EDIT: I overlooked your answer where you clarified your needs. As Luc already said there is no automatic way to generate plots like in MatlLab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You could do something like the attached, which makes it much easier to produce many plots as long as each plot has a similar structure and just varies by virtue of the varying values of k.
Alan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks to all for the information and suggestions.
