Skip to content

Commit

Permalink
synch
Browse files Browse the repository at this point in the history
  • Loading branch information
JFL committed Oct 23, 2023
1 parent 54051db commit 7a19238
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 10 additions & 2 deletions additionalCode/Grace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,16 +469,24 @@ void Grace::addPoint(double x, double y, int N, int G) const
sendCommand(s.str());
}

void Grace::setTitle(const char *s)
void Grace::setTitle(const char *s, int Graph)
{
std::stringstream s1;
if(Graph >= 0) s1 << "FOCUS G" << Graph;
sendCommand(s1.str());

std::stringstream ss;
ss << "Title \"" << s << "\"";
sendCommand(ss.str());

}

void Grace::setSubTitle(const char *s)
void Grace::setSubTitle(const char *s, int Graph)
{
std::stringstream s1;
if(Graph >= 0) s1 << "FOCUS G" << Graph;
sendCommand(s1.str());

std::stringstream ss;
ss << "Subtitle \"" << s << "\"";
sendCommand(ss.str());
Expand Down
4 changes: 2 additions & 2 deletions additionalCode/Grace.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Grace

void setCharSize(double s, int Graph = -1);

void setTitle(const char *s);
void setSubTitle(const char *s);
void setTitle(const char *s, int Graph = -1);
void setSubTitle(const char *s, int Graph = -1);

void redraw(int autoScale = 1, int Graph = -1) const;

Expand Down

0 comments on commit 7a19238

Please sign in to comment.