Creating a Plot in Two Variables - A Guide

  • Context: Mathematica 
  • Thread starter Thread starter Safinaz
  • Start date Start date
  • Tags Tags
    Plot
Click For Summary

Discussion Overview

The discussion revolves around creating a plot of a function in two variables, specifically aiming to replicate a figure from an academic paper. Participants explore different plotting methods and tools available in Mathematica.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Homework-related

Main Points Raised

  • One participant seeks assistance in plotting a function of two variables, expressing difficulty with ListPlot and RegionPlot for their intended visualization.
  • Another participant suggests that if multiple series are needed, a specific solution from an external link could be helpful.
  • A different approach is proposed involving a 3D ListPlot for visualizing functions with two parameters.
  • Another suggestion includes using Style to modify the appearance of the points in the plot, referencing documentation for further guidance.

Areas of Agreement / Disagreement

Participants present various methods and suggestions without reaching a consensus on the best approach to achieve the desired plot.

Contextual Notes

Some methods discussed may depend on specific definitions or assumptions about the plotting functions and their parameters. The effectiveness of each proposed method may vary based on the user's goals and the software capabilities.

Safinaz
Messages
255
Reaction score
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
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
 
Thanks :)
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K