Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
dcfcfbbc
Commit
dcfcfbbc
authored
20 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
%g->%.3g + use format also for 2d graphs
parent
03825ecd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Common/DefaultOptions.h
+2
-2
2 additions, 2 deletions
Common/DefaultOptions.h
Graphics/Graph2D.cpp
+6
-3
6 additions, 3 deletions
Graphics/Graph2D.cpp
with
8 additions
and
5 deletions
Common/DefaultOptions.h
+
2
−
2
View file @
dcfcfbbc
...
@@ -365,12 +365,12 @@ StringXString PostProcessingOptions_String[] = {
...
@@ -365,12 +365,12 @@ StringXString PostProcessingOptions_String[] = {
StringXString
ViewOptions_String
[]
=
{
StringXString
ViewOptions_String
[]
=
{
{
F
|
O
,
"AbscissaName"
,
opt_view_abscissa_name
,
""
,
{
F
|
O
,
"AbscissaName"
,
opt_view_abscissa_name
,
""
,
"Abscissa name for 2D graphs"
},
"Abscissa name for 2D graphs"
},
{
F
|
O
,
"AbscissaFormat"
,
opt_view_abscissa_format
,
"%g"
,
{
F
|
O
,
"AbscissaFormat"
,
opt_view_abscissa_format
,
"%
.3
g"
,
"Abscissa number format for 2D graphs (in standard C form)"
},
"Abscissa number format for 2D graphs (in standard C form)"
},
{
F
,
"FileName"
,
opt_view_filename
,
""
,
{
F
,
"FileName"
,
opt_view_filename
,
""
,
"Default post-processing view file name"
},
"Default post-processing view file name"
},
{
F
|
O
,
"Format"
,
opt_view_format
,
"%g"
,
{
F
|
O
,
"Format"
,
opt_view_format
,
"%
.3
g"
,
"Number format (in standard C form)"
},
"Number format (in standard C form)"
},
{
F
|
O
,
"GeneralizedRaiseX"
,
opt_view_gen_raise0
,
"v0"
,
{
F
|
O
,
"GeneralizedRaiseX"
,
opt_view_gen_raise0
,
"v0"
,
...
...
This diff is collapsed.
Click to expand it.
Graphics/Graph2D.cpp
+
6
−
3
View file @
dcfcfbbc
// $Id: Graph2D.cpp,v 1.4
4
2005-01-
09 21:36:47
geuzaine Exp $
// $Id: Graph2D.cpp,v 1.4
5
2005-01-
18 06:22:03
geuzaine Exp $
//
//
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
// Copyright (C) 1997-2005 C. Geuzaine, J.-F. Remacle
//
//
...
@@ -199,8 +199,11 @@ static void Draw_Graph2D(Post_View * v,
...
@@ -199,8 +199,11 @@ static void Draw_Graph2D(Post_View * v,
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
text
);
glColor4ubv
((
GLubyte
*
)
&
CTX
.
color
.
text
);
if
(
v
->
Type
==
DRAW_POST_2D_SPACE
&&
if
(
v
->
Type
==
DRAW_POST_2D_SPACE
&&
((
v
->
ShowTime
==
1
&&
List_Nbr
(
v
->
Time
)
>
1
)
||
((
v
->
ShowTime
==
1
&&
List_Nbr
(
v
->
Time
)
>
1
)
||
(
v
->
ShowTime
==
2
&&
List_Nbr
(
v
->
Time
)
>
0
)))
(
v
->
ShowTime
==
2
&&
List_Nbr
(
v
->
Time
)
>
0
))){
sprintf
(
label
,
"%s (%g)"
,
v
->
Name
,
*
(
double
*
)
List_Pointer
(
v
->
Time
,
v
->
TimeStep
));
char
tmp
[
256
];
sprintf
(
tmp
,
v
->
Format
,
*
(
double
*
)
List_Pointer
(
v
->
Time
,
v
->
TimeStep
));
sprintf
(
label
,
"%s (%s)"
,
v
->
Name
,
tmp
);
}
else
else
sprintf
(
label
,
"%s"
,
v
->
Name
);
sprintf
(
label
,
"%s"
,
v
->
Name
);
glRasterPos2d
(
xtop
,
ytop
+
font_h
+
tic
);
glRasterPos2d
(
xtop
,
ytop
+
font_h
+
tic
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment