graph - format of the numbers
Moderator: GiD Team
graph - format of the numbers
Hi,
I wanted to change the format of the numbers along the axis on a graph. Unfortunately changing the results format (Preferences - Format) doesn't have any influence of the format of these numbers. Is there any other command or possibility to adjust this format?
Because I don't want to use exponential representation of a number (1,000,000 instead of 1E+06) along an axis.
Best regards
Peter
I wanted to change the format of the numbers along the axis on a graph. Unfortunately changing the results format (Preferences - Format) doesn't have any influence of the format of these numbers. Is there any other command or possibility to adjust this format?
Because I don't want to use exponential representation of a number (1,000,000 instead of 1E+06) along an axis.
Best regards
Peter
Re: graph - format of the numbers
Unfortunately there is no option to change the number format for graphs.
We will discuss it in order to include it in next versions.
Regards
We will discuss it in order to include it in next versions.
Regards
Re: graph - format of the numbers
Wrote on Tue Jan 31 10:28:45 JST 2023.
Am using GiD16.
What happened to the idea of introducing EXPONENTIAL for the values on the axes of the graph?
Am using GiD16.
What happened to the idea of introducing EXPONENTIAL for the values on the axes of the graph?
Re: graph - format of the numbers
The graphs show exponential format when needed, but the format is automatic and it cannot be set manually.
See for example the Y-axis numbers Please, could you attach a zip with your graph and specify how do you exactly want to be shown?
(can export it to a .grf file for example clicking the contextual menu on the graphs window and select Export graph)
See for example the Y-axis numbers Please, could you attach a zip with your graph and specify how do you exactly want to be shown?
(can export it to a .grf file for example clicking the contextual menu on the graphs window and select Export graph)
Re: graph - format of the numbers
Thanks for the support.
The immediate problem now is trying to define a function in the material data.
I am attaching a file of the problem I encountered. However, it is long and I have modified it by hand to make it shorter.
The immediate problem now is trying to define a function in the material data.
I am attaching a file of the problem I encountered. However, it is long and I have modified it by hand to make it shorter.
escolano wrote: ↑Fri Feb 03, 2023 6:52 pm The graphs show exponential format when needed, but the format is automatic and it cannot be set manually.
See for example the Y-axis numbers
graph_with_exponential_numbers-Y.png
Please, could you attach a zip with your graph and specify how do you exactly want to be shown?
(can export it to a .grf file for example clicking the contextual menu on the graphs window and select Export graph)
- Attachments
-
- GiD__Function_graph_EXP.zip
- (162.58 KiB) Downloaded 311 times
Re: graph - format of the numbers
We are talking of different graph tools
I was talking about the postprocess graph window, implemented in C++ and OpenGL
and by the picture of your attached example you are talking of the auxiliary graph shown in classical problemtype questions, with 'array fields'. This graphs is shown using the TkLib Plotchart scripting package.
I will study your example and provide some solution soon.
I was talking about the postprocess graph window, implemented in C++ and OpenGL
and by the picture of your attached example you are talking of the auxiliary graph shown in classical problemtype questions, with 'array fields'. This graphs is shown using the TkLib Plotchart scripting package.
I will study your example and provide some solution soon.
Re: graph - format of the numbers
Thanks for your time.
Graph drawing is not an easy task from a general point of view.
An example of a classic tool is xgraph, and I have recently been using matplotlib as a modern graphing tool.
In any case, users have to specify many configuration parameters to get the desired graphs.
I suppose that GiD is not a graph drawing tool that needs to specify many configuration parameters, which means that less useful and complicated features will be added to GiD. Then, at the moment, I ask GiD developers to limit the role of graph drawing to quick checking of calculated or input parameters. In the future, I hope GiD will implement high quality graph drawing without complex configuration parameters.
Graph drawing is not an easy task from a general point of view.
An example of a classic tool is xgraph, and I have recently been using matplotlib as a modern graphing tool.
In any case, users have to specify many configuration parameters to get the desired graphs.
I suppose that GiD is not a graph drawing tool that needs to specify many configuration parameters, which means that less useful and complicated features will be added to GiD. Then, at the moment, I ask GiD developers to limit the role of graph drawing to quick checking of calculated or input parameters. In the future, I hope GiD will implement high quality graph drawing without complex configuration parameters.
Re: graph - format of the numbers
I have updated the related graph exponential format (automatic) available in GiD 16.0.4 official and GiD 16.1.3d developer. Both GiD versions are available for download just today:
https://www.gidsimulation.com/gid-for-science/downloads
https://www.gidsimulation.com/gid-for-science/downloads
Re: graph - format of the numbers
About the graphs of Python 'matplotlib', It is possible to obtain some 'similar graph' with the TclLib Plotchart package.
Can see here some images https://wiki.tcl-lang.org/page/Plotchart+gallery
(off course matplotlib is easier to use and more modern)
In fact I think that the matplotlib Python module is drawing in a Tcl/Tk canvas using TkInter (that is a wrap of the Tk's Tcl library to be called from Python)
Can see here some images https://wiki.tcl-lang.org/page/Plotchart+gallery
(off course matplotlib is easier to use and more modern)
In fact I think that the matplotlib Python module is drawing in a Tcl/Tk canvas using TkInter (that is a wrap of the Tk's Tcl library to be called from Python)
Re: graph - format of the numbers
A big new of GiD 16.1.2d developer is that is possible to run Python code from Tcl of GiD and vice-versa
https://gidsimulation.atlassian.net/wik ... hon+in+GiD
This show an example just using matplotlib:
https://gidsimulation.atlassian.net/wik ... ib+example
You can do a fast test writing this in the GiD lower entry
-np- GiD_Python_Exec {<paste_pyton_code_here>}
replacing <paste_pyton_code_here> by some example code of matplotlib like this
https://matplotlib.org/stable/plot_type ... tween.html
https://gidsimulation.atlassian.net/wik ... hon+in+GiD
This show an example just using matplotlib:
https://gidsimulation.atlassian.net/wik ... ib+example
You can do a fast test writing this in the GiD lower entry
-np- GiD_Python_Exec {<paste_pyton_code_here>}
replacing <paste_pyton_code_here> by some example code of matplotlib like this
https://matplotlib.org/stable/plot_type ... tween.html
Code: Select all
import matplotlib.pyplot as plt
import numpy as np
plt.style.use('_mpl-gallery')
# make data
np.random.seed(1)
x = np.linspace(0, 8, 16)
y1 = 3 + 4*x/8 + np.random.uniform(0.0, 0.5, len(x))
y2 = 1 + 2*x/8 + np.random.uniform(0.0, 0.5, len(x))
# plot
fig, ax = plt.subplots()
ax.fill_between(x, y1, y2, alpha=.5, linewidth=0)
ax.plot(x, (y1 + y2)/2, linewidth=2)
ax.set(xlim=(0, 8), xticks=np.arange(1, 8),
ylim=(0, 8), yticks=np.arange(1, 8))
plt.show()