0
$\begingroup$

I have a density plot and I need to put a name (Fig 1) below the figure.

    data1 = {{0.025`, 
0.075`, -11.400214920233049`}, {0.025500000000000002`, 
0.075`, -11.963992707513128`}, {0.026000000000000002`, 
0.075`, -12.741850703267362`}, {0.026500000000000003`, 
0.075`, -13.941305724894162`}, {0.027000000000000003`, 
0.075`, -15.178221279983168`}, {0.0275`, 
0.075`, -13.749504372889065`}, {0.028000000000000004`, 
0.075`, -12.609957855609531`}, {0.0285`, 
0.075`, -11.857187071700594`}, {0.028999999999999998`, 
0.075`, -11.303034487911573`}, {0.029500000000000002`, 
0.075`, -10.865631132456825`}, {0.03`, 
0.075`, -10.504475410396356`}, {0.025`, 
0.0755`, -11.377275773877606`}, {0.025500000000000002`, 
0.0755`, -11.938205266072528`}, {0.026000000000000002`, 
0.0755`, -12.715416916277317`}, {0.026500000000000003`, 
0.0755`, -13.946277129967559`}, {0.027000000000000003`, 
0.0755`, -15.56393423875837`}, {0.0275`, 
0.0755`, -13.905524560704707`}, {0.028000000000000004`, 
0.0755`, -12.678646501994098`}, {0.0285`, 
0.0755`, -11.898069035777292`}, {0.028999999999999998`, 
0.0755`, -11.331086872884903`}};

p= ListDensityPlot[data1, 
 PlotLegends -> BarLegend[Automatic, LabelStyle -> {FontSize -> 13}], 
 BaseStyle -> {FontWeight -> Bold, FontSize -> 13}, 
  ColorFunction -> ColorData["CMYKColors"]]

I found this using Grid and I tried below, but it doesn't work:

text = Text[(Fig 1)];
   Grid[{{ListDensityPlot[data1, 
PlotLegends -> 
 BarLegend[Automatic, LabelStyle -> {FontSize -> 13}], 
BaseStyle -> {FontWeight -> Bold, FontSize -> 13}, 
ColorFunction -> ColorData["CMYKColors"]]}, {Style[text, 
FontSize -> Scaled[0.005], FontFamily -> "Helvetica"]}}, 
 ItemSize -> Scaled[0.45]]

Thanks in advance.

$\endgroup$
1
$\begingroup$

You can add a label below by:

Labeled[p, "Fig 1", Bottom]
$\endgroup$
  • $\begingroup$ Thank you so much, this helped. But, do you have any idea how I can move the name a little lower? $\endgroup$ – Ghady Mar 23 '18 at 0:44
  • $\begingroup$ Labeled[p, "\n Fig 1"] $\endgroup$ – David G. Stork Mar 23 '18 at 0:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.