Creating a Plot in Two Variables - A Guide

  • Mathematica
  • Thread starter Safinaz
  • Start date
  • Tags
    Plot
In summary, the person is asking for help in creating a specific type of plot with multiple variables. They have tried using ListPlot and RegionPlot, but have encountered some issues. They are looking for assistance in creating a 3D ListPlot with different parameters and have provided a link to a helpful resource. They also mention another possible solution using a Style function.
  • #1
Safinaz
260
8
Hi all,

I'd like to make a plot like that in [arXiv:1312.1935], FiG. (2), it's a function plotted in a plan of two variables.

I tried :

* ListPlot: for example;

##\lambda##[s_,f_]= s+f;
list1 = Table[{s, f, ##\lambda##[s, f]}, {s, -1, 1, 0.1}, {f, -1, 1, 0.1}];
ListPlot[list1]

But it dosn't work, cause I think ListPlot like that works for one variable.

Also, There is RegionPlot, but it gives a continuous coloured region, while i'd like to have the function as 'dotes' as the green and red in the FIG.

Any help ?
 
Physics news on Phys.org
  • #2
  • #3
Safinaz said:
list1 = Table[{s, f, ##\lambda##[s, f]}, {s, -1, 1, 0.1}, {f, -1, 1, 0.1}]
Instead try:

Code:
list1 = Table[Style[{s, f},Hue[ ##\lambda##[s, f]], {s, -1, 1, 0.1}, {f, -1, 1, 0.1}]

A similar example is shown in the documentation for ListPlot
 
  • #4
Thanks :)
 

FAQ: Creating a Plot in Two Variables - A Guide

1. What is a plot in two variables?

A plot in two variables is a graphical representation of a relationship between two variables. It is a visual tool that helps to understand the relationship between two variables and identify patterns or trends.

2. Why is creating a plot in two variables important?

Creating a plot in two variables is important because it allows for a better understanding of the relationship between two variables. It helps to visualize the data and identify any patterns or trends that may exist. It also allows for easier comparison between different data sets.

3. What are the two main types of plots used in creating a plot in two variables?

The two main types of plots used in creating a plot in two variables are scatter plots and line graphs. A scatter plot is used to show the relationship between two variables, while a line graph is used to show how one variable changes in relation to the other.

4. How do I choose the right type of plot for my data?

The type of plot you choose for your data depends on the type of relationship you are trying to show. If you are looking for a general trend or pattern, a line graph may be more appropriate. If you want to show the relationship between two variables, a scatter plot would be a better choice.

5. What should I consider when creating a plot in two variables?

When creating a plot in two variables, it is important to consider the scale of the variables, the type of relationship you are trying to show, and the overall purpose of the plot. It is also important to label the axes and provide a clear title to make the plot easy to understand.

Similar threads

Replies
1
Views
1K
Replies
5
Views
2K
Replies
1
Views
1K
Replies
1
Views
3K
Replies
2
Views
1K
Replies
5
Views
2K
Replies
1
Views
2K
Replies
10
Views
1K
Back
Top