2
$\begingroup$

Is there a way to use Haloing on text in labels or ticks in Graphics3D? All of my attempts are being ignored in the final render, no error, but no haloing either. Version 14.1, MacOS

Edit: I am able to use Haloing in labels via Inset, but I still cannot get ticks to work. Adding a short example below. The red Haloing on ticks is not shown.

Plot3D[0, {x, 0, 10}, {y, 0, 10}, Boxed -> False, BoxRatios -> {1, 1, 1}, ViewPoint -> {1, 1, 1}, AxesOrigin -> {0, 0, 0}, PlotRange -> {{0, 10}, {0, 10}, {0, 10}}, TicksStyle -> Directive[Haloing[Red], Black, 20], Epilog -> Inset[Graphics[{Haloing[White], Text[Style["Text", 30]]}], Scaled[{0.5, 0.4}]] ] 

Plot3D example

$\endgroup$
5
  • $\begingroup$ Can you please include some of your attempts? An image similar to the inteded output would also be helptful. $\endgroup$ Commented Sep 30, 2024 at 5:10
  • $\begingroup$ In 2D plots it works, so I guess it is a bug. $\endgroup$ Commented Sep 30, 2024 at 10:11
  • 2
    $\begingroup$ @azerbajdzan, how can it be a bug when the documentation clearly says Haloing[] is a two‐dimensional directive specifying that graphics objects are to be drawn with a halo., and there is not a single example of using it in a Graphics3D. $\endgroup$ Commented Sep 30, 2024 at 10:21
  • $\begingroup$ @Domen Yes you are right, in fact I have a version that does not support Haloing I just did a quick try on cloud with version 14. I should not be responding to questions that are not replicable with my version. My fault. $\endgroup$ Commented Sep 30, 2024 at 10:37
  • $\begingroup$ @Domen You are right about the 2D vs 3D. However, the Graphics Inset is also a 2D object and Haloing works there. Ticks are in principle similarly 2D flat objects embedded in a 3D environment (their position is based on the 3D->2D projection, but otherwise they are unaffected by perspective, point of view etc.) That's why I thought it should be possible to make it work but I'm perhaps missing something. $\endgroup$ Commented Sep 30, 2024 at 13:52

1 Answer 1

2
$\begingroup$

The closest to a solution I came up with is using rasterized images for the ticks. It might not be the cleanest, but it does the job:

Plot3D[0, {x, 0, 10}, {y, 0, 10}, Boxed -> False, BoxRatios -> {1, 1, 1}, ViewPoint -> {1, 1, 1}, AxesOrigin -> {0, 0, 0}, PlotRange -> {{0, 10}, {0, 10}, {0, 10}}, Ticks -> {Table[{i, ImageResize[ Graphics[{Haloing[Red, 20], Text[Style[i, 300]]}, Background -> None], 50]}, {i, 2, 10, 2}]}, Epilog -> Inset[Graphics[{Haloing[White], Text[Style["Text", 30]]}], Scaled[{0.5, 0.4}]] ] 

Rendered plot

$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.