Creating a Plot in Two Variables - A Guide

  • Mathematica
  • Thread starter Safinaz
  • Start date
  • Tags
    Plot
  • #1
241
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 ?
 
  • #2
  • #3
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 :)
 

Suggested for: Creating a Plot in Two Variables - A Guide

Replies
1
Views
814
Replies
2
Views
967
Replies
0
Views
545
Replies
2
Views
662
Replies
1
Views
824
Replies
4
Views
1K
Replies
7
Views
832
Replies
2
Views
1K
Replies
3
Views
1K
Replies
0
Views
789
Back
Top