sundmanbo / opencalphad

Open Calphad, thermodynamic calculation code
http://www.opencalphad.org
181 stars 76 forks source link

Legend/subtitles/set position #56

Closed Trianex closed 1 year ago

Trianex commented 1 year ago

Dear All, I have had some problems to set an ideal position to the legend (or key) of Scheil-Gulliver. Of course, I'd like to set in a position that this legend does not across the curve. As the figure below. But, when I try to set a position, it takes outside the graph or change "Equilibrium" legend. It seems that is not possible to set just one legend.

fig12_mod

I have tried by both OpenCalphad (Tools > Utility for Gnuplot) or directly in Gnuplot without success. In OpenCalphad I could not plot. Because this "Plot" function stay unavailable.

Any tip?

Jerry1999 commented 1 year ago

Hello Trianex,

This problem will be fixed in the next release of OpenCalphad CAE.

However, you can plot it with right legend position via manual modification of fig12_mod.plt (or fig12.plt) file.

1) Go to folder C:\OpenCalphad_CAE_0_1_0\Console\temp_output 2) Open fig12_mod.plt using any text editor 3) Find the line ' set key title "Scheil-Gulliver" ', then go to the next line and replace string 'bottom left' with 'at 0.75, 2000' 4) Find the line ' set key Right title "Equilibrium" ', then go to the next line and replace string 'bottom left' with 'at 0.75, 2500' 5) Save fig12_mod.plt 5) Double-click fig12_mod.plt to plot (if gnuplot is added to path in the environment variables)

Tips: you can always edit the plt file to generate new plot if you have good knowledge about gnuplot (http://gnuplot.info/). Use: set key at x, y where x and y are the values for the x-axis and y-axis respectively

Trianex commented 1 year ago

Hi Jerry1999, Great! It worked.

Just one correction in the path 4 that you showed to us. We will find "top right" instead of 'bottom left'. I followed your instructions. But, I just put:

  1. 'at 0.75, 2000' as 'at 0.90, 2000'
  2. 'at 0.75, 2500' as 'at 0.90, 2500'
  3. I changed the font from 11 to 8

Then: fig12_mod

Thank you Jerry1999!

All the best, Trianex